The courts are divided on this question, but most will examine whether the clothing would create a substantial disruption or material interference with school activities or invade the rights of others.
Practically, the issue boils down to whether the school has had prior incidences of racial violence or tension. If school officials can point to such incidents, a court will tend to side with them in Confederate flag attire cases.
However, the Supreme Court has also said that school officials could not censor student expression based on "undifferentiated fear or apprehension." This means that school officials have some burden to justify their actions.