Ostracising a child is a common form of bullying. So the OP needs the school to check whether this is what is happening.
Things the school can do are:
-Investigate what is happening
-identify possible alternative play mates
set up organised games on the playground
set up clubs
provide a safe place for the OP's child to hide out
-give the OP's child some jobs at lunch times
What the school should not do is shrug their shoulders and pretend there is nothing they can do to help a lonely child. It is not 1982.
Firstly, there is very little evidence that the OP's son is being ostracized. She said there is a lot of 'you're not allowed to play with us.'
That implies that the child has asked to join in something and been refused. I agree that this needs investigating if it is happening. But the OP suggests that her son doesn't want to join in.
Identify possible alternative playmates. As I said, this isn't likely to be effective.
Set up organized games in the playground. Teachers have enough to do already without setting up games at playtimes. Children play, it's part of social development and doesn't need organizing.
Provide a safe place for the child to hide out.
This isn't going to help him make friends.
Give the child some jobs at lunchtime.
What jobs? And why should teachers spend their own lunchtime organizing jobs for pupils? If they're lucky, they might get time to eat their own lunch, but in many cases, lunch is a hurried scramble before going back to lesson planning and marking. In any case, the child doing a job won't help him with his friendships.
As I said before, the best option is out of school activities, or invite children for playdates, organize fun activities for them and take it from there.