This is awful.
It goes on in UK schools too though. I remember having this very issue and this is like 15 years back now. Our school said we could not under any circumstances go to the loo during lessons, and the toilets were locked except for in breaks (so you couldn't even nip there between lessons). It was horrendous, and going from people I know the rule is still in place. We even had a kid in our class with bowel issues that shat himself because of this rule, a few times. His parents eventually moved his school as they would not even make an exception for someone with a disability. I would hope such draconian rules were not still around, but it seems they are getting worse.
I actually used to play truant when I had my period. Or, if my parents actually took me to school, in the first break I would hide in the loos to get locked in, then just spend my day in the toilets reading 
And the jumper round waist 'solution' is vile too tbh.