My highschool had a no yoga pants/tights/stretch pants/leggings rule. But only enforced it for the not hot girls.
One day I wore a pair of my (at the time) girlfriend’s yoga pants to school. When a teacher stopped in me the hallway I just pointed out all the other girls wearing them with no issue. I got detention but yoga pants were never brought up again.
Also the volleyball team wore yoga shorts as part of the uniform.