How we change what others think, feel, believe and do
Spot a friend
Suddenly notice another person across the room. Wave at them, then excuse yourself to go and see them.
You do not need to actually have a friend there, although of course it does help.
Add appropriate elaboration to make your case credible, but of course do not over-do this.
This is easier when there is a larger crowd of people or you are at a social gathering.
Good heavens, is that George -- excuse me, I haven't seen old George in donkey's years. I must go and see him. Terribly sorry and all that.
Excuse me, I've just seen my wife arrive. Would you mind if I go and talk with her?
Sophie! Hi! Excuse me -- I must catch her before she leaves.
This is a very common method of excusing oneself, and hence is reasonably accepted.
It is still not terribly polite, as it positions your friend as being more important than the person with whom you are currently talking.