Was tapping a friends hips a red flag?

So we were at a party with my friend, my boyfriend and some of his friends from his sailing team. My friend and my boyfriend are also friends.

After some drinks, we were dancing and my friend was close to me, my boyfriend wanted to come closer to talk to me, my friend was in the middle, so as he was passing he tapped my friend's hips on the side, more like in a "come on, move" way. I got angry and when he came to talk to me I said "did you just tapped her hip?" He replied "I just did it so that she would move and I could get close to you". I told him "pull yourself together!" very aggressively, so he got upset and didn't want to talk to me. Afterwards we went outside to talk, he told me that what I said drove him away and was aggresive and he didn't mean to act inappropriately towards my friend, he just did this gesture to make her move, so that he would come closer to me. Also, my friend didn't mind. I told him that i just didn't like the gesture even if it was harmless and we ended up apologizing to each other, him for doing something that make me uncomfortable and me for being aggresive towards him after that and not expressing in a calm manner that I didn't like it. Should I not apologize? Was that all my boyfriend's fault?

Was tapping a friends hips a red flag?
Post Opinion