1. This is Johnny. He is a little boy. He goes to this school. This is the school he goes to. This is the boy's school. This is the hat he wears. This is the boy's hat. [When we say this, we would usually stress "school" and "hat".]
2. Only boys go to this school. Only girls go to that school. This is the boys' school. That is the girls' school. [When we say this, we would usually stress "boys'" and "girls'".]
Your teacher was thinking that the meaning of the sentence was the meaning shown in the second example.
CJ