Very good question Jenae. Not one with an easy answer.
My son, now 18, is Autistic and had the very same problem in school. We had taught him to befriend others regardless of their background, color, religion, etc. We found that he was easily swayed in the wrong direction because of his Autism. It's also as easy for a 'normal' child to go the wrong direction also. Once they hit school age it's difficult to choose all their friends for them. You have control over who they see or communicate with after school hours, not during.
What we did was discuss each situation as it arose. We used it as a learning experience for our son. We'd discuss what was done, why it was wrong or right, what could have been done different, etc. Another way we taught him was by using TV programs as an example. We'd watch shows like Arthur and discuss whatever the theme of the show was for that day. By using imaginary situations we weren't singling out indivduals yet teaching him to recognize the charateristics or actions of others and what made them right or wrong.
My fear, which proved to be right, was that if I banned him from playing with certain people he would seek them out just because I had said no. A typical child's reaction. Stress the actions, good or bad, not the child and your child will learn early how to be selective with his friends.
I hope this has been helpful.
Blessings,
W.