It doesn’t seem innappropriate. Check with a teacher or whoever is running the dance and they’ll tell you if it’s ok for school, although I don’t understand why it wouldn’t be.
Balls and proms are subject to whatever rules the host makes up. Except that one where the principle demanded to inspect female underwear at the door. That sort of behavior is not tolerated.