In a service industry that requires close "hands-on" contact, barbers and stylists are very aware of their actions. How can they not be? It's what they do for a living!! Look at it this way: A good barber will see 80-100 customers during the week. He could not use that same "technique" on all his customers without someone putting him in check! So, I believe that what happened in your situation was no accident. He was rubbing up against you to see what you would do. It was one of those "DL" signals.
It happened to me too a long time ago, but I remember it b/c I felt very uncomfortable about it. We were alone in the shop. His crotch, his body, his arms were just way too close. The only thing he didn't do was staddle the chair and give me a lap dance! Plus, it took him 45 minutes!!! All I ever get is a shape-up and trim-- 20 minutes tops. I regret that I did not assert myself then and say something to him. But I was much younger. I just never went back again.
I've now had the same barber for almost 12 years. He's very professional, and he's never, ever crossed that line of inappropriate closeness. He's cut my hair at the shop, at his house, at my house, and for a while he was coming to my office, too. There is no way I'd ever let someone come to my workplace that acted unprofessional in any way.
But the real issue here is your comfort level. If you felt wierd or uncomfortable, then you're probably right to do so. Use your sixth sense and trust you instincts!! Move you arm away-- and maybe elbow his nuts in the process. Tell him that you need a little more personal space.