In my group of friends this scenario would be unthinkable and totally uncalled for. Being mates have some "unwritten rules". 1 of them is "never f@#! around with ur friends ex!" . At least not shortly after they broke up. If some time passed and things calmed down, then maybe, but then u talk with ur mate about the matter first, explain the situation.
IF this shit happened 2 me i would tell my friend 2 f@#! off, along with my ex in a "u deserve eachother" tone, then move on. When ppl asked me what the deal was between me and this "friend" i would simply explain the situation. ANy guy would totally agree with u, and think the dude was a prick.
Of course, getting drunk and having some rebounds is a normal thing 2 do after such a thing!:D but hey! ur a hurt hurt man! Then u have sometthing 2 blame when u wave ur dick around town!