In your opinion.
A lot of the medical community would disagree.
As would trans people.
In any event, if a young person doesn't feel safe disclosing something to a parent, that's surely a parenting issue. I fail to see what would be gained by a teacher disclosing it against the child's wishes.