Many people come to clubs to flirt, hitting on girls is commonplace. I think so long as you clearly show that the girl and you are in a relationship, the person should back off right away and apologize for misunderstanding. If he persists then I feel that the two of you should simply walk away.
However if you and the girl are simply acquaintances, I think that you have to accept them some people might try to hit on your friend, trying to get lucky, and there isn't much you can do about that.