I totally believe members of the opposite sex can be just friends. I can certainly testify that my opposite sex friends know beyond any doubt that we're just friends (perhaps with the exception of one) and that is where it stays. There are two considerations for those with opposite sex friends;
a) Are you single?
Is there any sexual attraction between you two? Is the attraction one sided or is it on both sides. This is where things may get complicated. If your friend expresses or displays behavior indicative of sexual attraction how do you handle it?
If you're not interested in anything but friendship then;
-tell your friend the friendship is too important and you don't want to risk it
-do not send out any mixed messages
If you're not seeing anyone and you and your friend are equally attracted to each other, then consider if you want to take it further.
-Indulging sexually with a friend will change the nature of the relationship.
-What happens to the friendship if you get into a romance which turns sour?
b) Are you in a relationship
If the friend is an x, then certainly you can understand why your partner may have issues with such a friendship. If you and an x remain friends(which I think is fine anyway), this friendship should be casual at best. The relationship should be maintained in such a way that your partner has nothing to worry about. For instance your friend can't call your place at nights if you live with your partner. Also you can't drop everything to run to your x's side and think your partner will be ok with this, particularly on a recurring basis.
When in a relationship it is important to set boundaries with opposite sex friends. In the end, if you can't set up boundaries with said friends, then maybe it is time to decide which is more important to you.