He's definitely a rival(FOE)...and of course you shouldn't be
friendly towards him. In this case, if you think that being
unfriendly is not gracious...then you're wrong. And you're not man
enough if you don't stand your ground against this kind of nonsense
act, but never direct your anger towards your girlfriend...just
that irritating guy.
I must implore you to trust your girlfriend at all times...even
when sometime coincidences can make it seems like she's betraying
you. (I hate those coincidences that are constantly testing
everyone)
Your girlfriend chose to be with you and not anyone else, so she
deserves your trust at all times...trust her ok? She'll know how to
'siam' any advances and not get herself into any deadlock
situations with that guy.
By right, she is not supposed to be messing/mingling with any other
guys accordingly to a guy's point of view. But by left, she's not
married to you yet...so she's still available to all guys if they
are able to worm their ways into her soft-heart.
Come on....girls also desire romance and lots of love at
any point of time. So if you're boring and static as gravity, don't
expect her to be a nun for you. And that's why we get breakups, cos
the guys don't keep up to their promises. For example, "You said
you love me?...So is that all to your love towards me?" something
like this will definitely pop up in the girl's mind eventually. So
if you don't want her to think of this, do something about it and
defy gravity. Love is constant...but relationship shouldn't be
constant...it should be spontaneous and like a roller-coaster ride.

Ask yourself, is that guy doing something that you should be doing
for your girlfriend? If that is so, then you should do something
about it before you girlfriend realise how boring her life has been
ever since entering into a relationship with you.
Maintaining a relationship has so much more heavier
responsibilities compared to keeping a promise. So if you truely
love your girlfriend, let that desire reaches her everytime both of
you are together.
Lead the way in the race of love and leave the rest of the
competition behind. 
Good luck. 