The best way I've found to approach teachers about things they do in the classroom (which they presumably think are okay) and you disagree with, is to approach them from the point of view that they're not wrong: but instead, that you have a preference that's different, and you're asking them politely to adjust to your preference, but understand it's a significant ask.
My son, for example, who's only a year or so older than your daughter, has had an issue recently where he's dropped his pencil and it rolls under something. Due to COVID, he's not supposed to be up and about too much, but when he asked the teacher to get his pencil, she decided that he had thrown it intentionally, and made him change what he was working on instead.
I don't find that a useful way to approach that issue (both because I believe him when he said he didn't, and because I think it's a poor way to address it in general; if he's working on something happily, discipline shouldn't get in the way of that.) The way I will address this with them is:
- Let them know that I appreciate what they're doing with my son in general
- Let them know that my son came to me with this problem, and ask if they can give context to what happened
- Ask if there's anything we can do together to help solve the problem (the problem being that my son is, apparently, throwing things, or perhaps more likely is being uncareful with his pencil).
- Thank them for working with me to help my son be as successful as he can be in their environment.
Your issue could be addressed pretty similarly, I think.
- Let her know that you appreciate what she's doing with your daughter
- Let her know what your daughter told you, and ask for her perspective on the matter. Let her know that you felt uncomfortable with it, perhaps in those words specifically.
- Ask if it is possible to accommodate your feelings here, and be pretty specific about what bothers you about this - but without using accusatory language; perhaps something like "I'm uncomfortable with my daughter being in the toilet with a boy", or "I'm uncomfortable with my daughter getting used to the idea of being in the toilet with a boy", or whatever is your specific concern - but phrased as if it is specifically your issue, not her problem, and you're asking her to make an accommodation for you.
- Thank her for working with you to help get your daughter the best education she can.
Here, in 2. it is important to ask them for their perspective, as it may be different than what you got from your daughter. (Perhaps she asked your daughter to show him where the toilet was, but didn't go in, or perhaps she meant for her to do something different from what she actually did do.) It also gives you context as to why she might have done that - did she ask her to do that because she's the most responsible kid in the class? Is it one of her close friends? That's not to say your concern isn't still valid, but it might help you understand her better.
The important thing here is to go into this assuming that she wants the best thing for your daughter just as you do, and she just has a different point of view. If you approach the conversation, at every point, as a collaboration, it will go well.