I think the suggestion that it's mean or selfish or hurtful not to invite every child in the class is bizarre. At what age do you stop that - or as adults should we all be upset or hurt because people who we don't particularly know or get on with don't invite us to their parties?
Personally I hate all-class parties. They are usually fairly meaningless, the birthday child doesn't really know or perhaps even like many of the children, they perhaps don't even acknowledge many of the other children at the party beyond taking the present off them. I have seen this so often at parties. And they are usually held in soul-less places with awful food!
By contrast, parties where there are only say 5-12 children are so different, in my experience. The children have asked those they really know and like. They are friends, not just someone on a class list or someone your mother has insisted on inviting because you went to their party and so 'owe' them an invite. My own children have always preferred this smaller sort of party to one where they are one of 30 or whatever. In fact, as they got a little older, they would sometimes decline an invitation because they know they aren't really friends with that child, or the child isn't particularly pleasant to them.
We only ever invited 'proper' friends, as chosen by my children. Children they really wanted there. Funnily enough, we had many a parent over the years say how their children talked about our parties, although we did nothing really spectacular. I think it was just that they were that bit smaller and cosier. Obviously, because we were inviting very small groups, this meant children were 'left out' or not invited to ours despite them inviting our children, but I don't actually think it's a huge issue.
As long as a child seems to have some friends and is generally happy with their friendship group, I wouldn't stress over parties at all. It's just not worth it.
I also find it bizarre and worrying that a nursery-owner says that 3-year-olds and even children in reception don't know who they like and dislike. Of course they do. I work in a playgroup and see very definite preferences. Of course, at a certain age or stage, children will play alongside one another and may not have particular friendships. But many children can and do have very strong feelings about who they like or who they don't feel comfortable with, and I don't see why a parent should ignore that. Why on earth would you invite a child your child has said they don't like or who isn't nice to them?
As long as you are sensitive about where and when you give out the invitations, I don't see the problem. And parents shouldn't make a big deal out of it if their child isn't invited sometimes - a brisk but cheerful comment about perhaps X's mum and dad could only invite so many children is usually enough. That's life and I don't think it's an unduly harsh lesson to learn.