You can "monitor" her at school, you and your husband might need to have a meeting with her teacher and other support staff about it, but it is possible. Send an email to the teacher and start some two-way communication. Schools have teams that help students beyond just their academics. If it is a true medical diagnosis, the school can even give her a 504 plan, which would give her accomodations like having a bottle of water with her in class, being allowed to use the restroom when necessary, and eating a healthful snack to keep her blood sugar and fiber intake going. Her teacher could email you when issues arise, or just to let you know how she's doing.
It sounds like she might need some "training" time to understand the way her body works. 9 years old is old enough to understand basic body functioning. Her pediatrician might have some helpful ideas. She also might be using this as a type of power struggle with you all, because her toileting has, as you said, become a primary focus in the family.
My husband is a mental health counselor who works in a special hospital-school environment with kids ages 8-18. He is always very concerned when he has a child over 8 who has toileting issues. In his experience, it is usually a symptom of something else beneath the surface. You should reconsider a good youth/adolescent counselor. Many community health programs offer referrals.
Good luck to all of you!