I think people are different -- and what might be impossible for some is possible for others.
I have always had male friends, as well as female. (I am straight, female, single and early 50s). Some of my male friends I've had for decades. Some are single, others are partnered. Occasionally, I have had a male friend who I was not interested in 'hit on me,' but in most cases we actually weathered the whole thing and most are still friends and still in my life. Three spring immediately to mind and all three are now married and I am friends with their wives too. There was one man I had to 'cut off' because he formed what I thought was an unhealthy obsession, but he wasn't a close friend -- more of an acquaintance.
Curiously, I have had a couple of male friends who I believed myself to be in love with, but they were not into me. I was not very good at staying friends in those cases. I think that's because I got quite emotionally attached and couldn't handle it that well, whereas the men I refer to above may have been attracted physically but didn't form that kind of deep attachment. That or I have a giant ego and just don't handle rejection well at all:)