Your son is not a brat! children under about 2 1/2 to 3 yrs old just don't understand sharing yet. They tend to be very possesive and not wanting others to touch "their" stuff. I have a little girl just over 2 1/2 and she is the same. It is very frustrating to a child when they are removed from a situation they can't comprehend. Especially if you are "punishing" the child or telling them that what they were doing is wrong. NOT that I am saying YOU specifically were punishing him. I am sure you were just removing him from the situation.
I try hard to use words like, "It's fun to share with your friends." "Isn't it neat that you both can have a turn." Make sharing exciting.... not just something he HAS to do. Let him have a turn for a couple minutes, and then say - "OH wow, look now it's Johnny's turn. Let's watch Johnny try it. Neat, Johnny likes it just like you do." "What a good boy, you take turn so well!"
Good Luck, hang it there - it gets better soon!
J.