Let's see my honest perspective on this: Yes it's possible, but it seems to be more difficult as I get older and there's just not as much in common and fewer mixed social groups where friendships can develop. In practice it doesn't happen much and being a gal who's usually been more comfortable being friends with guys I've kind of developed an early warning system and some rules to help guard my heart and keep my emotions in check. For what it's worth here are some of my basics:
1) The 2 hour rule- don't spend more than 2 hours a week engaged in personal conversation with a member of the opposite sex that you're not intending to date when you get the chance. That was something I picked up from an article someone posted about those too close friendships that become pseudo relationships and how to avoid them.
2) Keep it shallow - Books, TV, sermons, current events, politics, etc not hopes and dreams and past traumas and especially no secrets, secrets or implied secrets are one of the fastest ways to get too close
3) Include spouses- Should be obvious, but especially with friends of the opposite gender just make it a 3 way friendship and include the spouse in activities and conversations. And if it's new friends, try to let the same gender spouse be the person you make plans with when you make plans with the couple.
4) Cultivate an off limits mindset - Again should be obvious but people who are in a relationship aren't available for you to be in a relationship with. They're off limits. You have no chance and shouldn't be angling for one. They've already chosen and it wasn't you so move on. And anyone who is willing to break their commitments for you is likely one day to be willing to break their commitments to you. That's just so not worth it.