You can use the toilet on a moving coach if you really need to use the toilet.
Although using the toilet on a moving coach is strongly discouraged as a result of safety concerns.
Toilets on a coach or bus are often reserved for emergency use only when you can't wait to reach another toilet or can't wait until the coach or bus stops.
Using the toilet while the bus or coach is moving down the road is dangerous as it's also easy to lose your balance and cause you to fall.
Coach and bus operators often stop on regular scheduled rest stops to allow the passengers to use the restroom and stretch.
While you can use the toilets on board the coach or bus it's preferred that you use the toilet at the scheduled stops instead.
Passengers of coaches or buses are strongly encouraged to use the restroom or toilet on a bus or coach only in emergencies or at the scheduled rest stops to avoid falls and ensure that everyone is safe on board.
I've once had to use the the toilet while the bus was moving and I had a hard time balancing but I could not wait as I was about to go in my pants due to a stomach cramp and diarrhea.
Other than that I prefer to wait until the bus or coach stops or go in a toilet at a rest stop.