My parents used to say that all the time, when while growing up they didn't like it if I became best friends with a gauree, but we do have gauray family friends , back then we had them and even now! Funny!
I do think there is some truth in it, but not always. Our Prophet (saww) for example was often kind and polite towards non-Muslims, they sometimes visited. It doesn't mean he was like those non-Muslims of course. :)
People can like someone completely different from their own character, it doesn't mean we are like all the people who we associate with. What if you have Hindu friends, Christian friends, atheïst friends,** it doesn't mean that you are exactly like all of them just because you visit them or perhaps even are best friends with them. **:) You can be still Muslim and have an Islamic way of life, but yet have Hindu, Christian and atheïst friends.
Being like them and known by them are two different things.