I'm undoubtedly not the best PC member to be replying to your post. But I noticed you had yet to receive a reply. So I thought I would write one. (Hopefully other PC members will yet have insights they can offer.)
From my perspective I think the wise course of action here would be to resolve the 9 year relationship you have with your male friend before you initiate a sexual liaison with your female friend. Not doing so, to my way of thinking, just complicates everything & has the potential to create all sorts of hard feelings & confusion.
Here's a link to an article, from Psych Central's archives, that discusses the differences in how men and women view infidelity:
Women and Men React Differently to Infidelity
Of course, I don't know what type of relationship you have with the male you've been with for 9 years. If your relationship is such that you can simply tell him what you plan to do, & he'll be accepting of that, perhaps you could handle it that way. But I think initiating a sexual liaison with your female friend secretly, while you're still with your male friend of 9 years, is a recipe for trouble.