It depends not just on the relationship, but on the context of the friendship. One of my best friends is a single guy, but he’s also much younger than I, and the relationship is very much a big sister/little brother, mentor/mentee kind of thing: I give him advice and talk about life, he’s the one that shares his feelings and anxieties and hopes and dreams and such. And we play a lot of cards in groups. So sexual undertones don’t really have anywhere to take root. I would not spend as much time with someone I could see as a potential mate. I also tend to think friendships that are about something specific are less potentially harmful than ones that start with a broader base: i.e., gaming buddies or running buddies or birdwatching buddies are less problematic than someone you have all sorts of things in common with.
There are lines of intimacy I don’t think you should cross with a member of the opposite sex/preferred sex. YMMV, but to me if you are sharing more of your hopes and dreams and fears with that person than with your spouse, you have a problem. If you start comparing them to your spouse in your mind, you have a problem. If they know you better than your spouse, you have a problem. Anyone in any relationship has the responsibility to look out for these signs, and if you see them developing, cut off or greatly limit contact with that person–or at least accept what’s happening and deal with it in some way. (There are obviously short-term exceptions to this: your single friend gets cancer or arrested or something, they may eat up more of your time for a while. But it shouldn’t be the status quo)