I don't think Starfleet really has much rules regarding to how one should wear one's hair given the multitude of different hairdos we see during the show. It wouldn'be practical anyway because not all of starfleet is human and not all aliens can be expected to wear their hair the same way.

I always had the impression that Starfleet is pretty relaxed in that way. Yes, Starfleet has rules on uniform (ensign Ro and the story about whether she was permitted to wear the earing or not) but captains and commanders seem to allow considerable leeway when it comes to those rules (Troi's Uniform, Worf's sash, Ro's earring, O'Briens sleeves rolled up etc)