The answer is yes, with qualifications.
Opposite-sex friends are OK IF:
1) Such friendships do not deliberately exclude your spouse
2) Your spouse does not have discomfort with the friendship. Where an opposite-sex friendship teeters over into an EA is like what Justice Potter Stuart (or was it Abe Fortas?) said about pornography: "I can't define it, but I know it when I see it."
3) The friend's needs do not become more important to you than your spouse's.
That's pretty much the big 3.
3 years ago, my H had "friendships" with three women co-workers. One of them was at work only, little or no socializing. This one, the few times I saw her, was always nice to me. No problem. The second one, my H was always cognizant of my feelings when dealing with her. ONe night H came home from work feeling ill and exhausted. Woman Friend #2 called, upset, threatening to quit. Suddenly H was saying he'd pick her up and take her out for a drink. Out of bed, putting on shoes, then stopped, looked at me, and said, "Do you want to come along? This looks pretty bad, that I'm too sick to deal with you but when J. calls, I'm ready to go." I went along, we both helped calm Friend #2 down, now Friend #2 was a friend to both of us.
"Friend #3", a.k.a. Dragon Lady. Never made an attempt to be nice to me. Would call him at the house and never even say hello to me, just ask to talk to him. Left him messages like "I really need to see you, I really need to talk with you." H sneaked out to see her. H took her up to our bedroom during a summer barbecue to see our cats, not thinking about how I felt about it. Insisted all along that they were "just friends". Never cared that it made me uncomfortable, just got angry: "You don't trust me. You think I'm f***ing her."
Do you see the difference in those three "friends"?