In our school district, (two elementary schools, one middle 5-8 and one high school 9-12), this is how we do it.
(And this is basically the elementary schools' rules. At junior/middle and high school, you know the numbers of your friends, etc. who you would invite to a party.
Either the whole class is invited or it is either all boys invited or all girls invited to a party, if you are handing invitations out at school. You cannot just hand a few invitations to a few people in your class. Also, I am not sure, but I don't think you can hand out invitations to other kids in other classes. This is per your class only. Anything else must be done outside of school.
It is not the teacher's job to hand out invitations or to see that they get to other students in the school.
Also, we do not have a directory, so we cannot fiind out addresses of students this way to mail them personally.