Whatever a student chooses to disclose in confidence with a teacher or counselor should be respected as confidential, and not be disclosed to any other person (including both parents and other school staff) inside or outside the school. Such is in keeping with normal expectations or confidentiality.
For the school to implement an official policy with regard to the pronouns to be used by all staff with regard to a particular student, whilst withholding information about such policy from that student's parents is a far different matter, and is fundamentally wrong.
Schools, by long established convention, are both entitled and expected to act in loco parentis . They hold a quasi parental authority during school hours as a limited surrogacy for parental authority. But this limited authority is only lent to school employees by the actual parents who hold the primary authority as parents.
Apart from this, it is truly hazardous in a number of ways for a child to have one identity at school and another at home.
It can also be a severe violation of the conscience of a teacher who finds such a dishonest policy to be morally objectionable.