Admittedly, it's a long time since I taught in sec schools, but I never ever used to stop anyone using the toilet in lesson times. As a teacher you son learn which kids are trying it on and which are genuine. You get to know your students. I'd never allow anyone to go in a convoy- ie on a whim just because their friend was had asked to go.
Holding on if you need the loo- for wees, poos etc is bad anyway for all kinds of health reasons- and bladders and bowels don't always work in tandem with lesson changeovers.
As a kid myself, a teacher would not let me use the toilet (I was in primary school.) I'd hung on for ages, trying to wait till home time, but even though it was nr home time I couldn't wait. I wet myself. I was so embarrassed and I never ever as a teacher wanted any kid to go through the same thing.
As I said, most teachers know the 'bad' kids and know which toilet requests are genuine.