The school probably has this policy in place so that no kids will be wallflowers. If they didn’t have that policy, this mom would probably go ballistic when her daughter’s feelings were hurt because no one would dance with her. I guess the solution is to stop having the dances.
The best solution is to stop having schools, period — at least public ones.
If you can’t let kids be kids that’s the only solution! - No dances!
Or assign partners. No one should be forced to dance.
Or they could do what schools did in the old days. There were two situations where dancing occurred. In the typical "dances" you asked someone to dance and they said either yes or no. Part of the experience was learning about rejection, hanging out with your friends and hoping for attention, etc. You certainly learned about how both parties have to consent to the interaction.
The second situation where dancing occurred was during gym class when the teachers decided square dancing was the activity of the week. In that situation you didn't get to chose your partner, and as the dance progressed you had to dance with whoever ended up as your partner or corner. Of course the amount of contact between dancers was minimal, and given that everyone was wearing their gym uniforms it was about as far away from romantic as you can imagine.
The solution is to give up expecting ladylike and gentlemanly behavior from people who aren’t ladies and gentlemen.