As we all just saw with the SAE fraternity story, if a school receives government funds it's a defacto extension of the government and may NOT suppress 1st Amendment freedoms.
If this school was private and receives no funds from the government it would have greater leeway in dress codes and personal grooming standards. But if it's a public school, and the hair was short (as opposed to very long, longer than a girl's say) then it may not force conformity.
Supreme Court (wrong imo) said in a 1972 case long hair was not protected under the 1st Amendment. But while I can kinda see how long hair could be disruptive or even a safety issue (in shop class say and getting it caught up in machinery and the like,) for short hair that sensibility wouldn't apply.