I'm very sympathetic to your situation. At least you're talking to her about it, and NoFap, and she's open to talking to the doc.
I'm sure I'm preaching to the choir here, as you seem like a genuine, sensible guy, but do you still try to make her feel special? Buy her flowers, jewellery, little gifts? Leave her little notes? Tell her how much you love her? Compliment her? Do stuff she wants to do, together? Give her back rubs, foot massages? Cuddle? All without the expectation of sex?
If you've got out of the habit of these things, it's not surprising, you've been together a long time (as have I with Mrs Pinesapple). But it's not surprising either that if all you want is the odd 'roll in the hay' she's not that interested.
Personally, I'd try and stay away from the friend. It's a betrayal. By you, and by her friend (although she's more a friend of you as a couple?). It seems an obvious solution, but unless you've discussed it with your wife with (in abstract terms!!), and she's specifically given your express permission (even then I'd worry), I wouldn't go there. It could get very, very messy. My Mrs, on discussing Porn, and my problem with it, told me that she'd rather I was having sex with another woman, than these unattainable 'perfect' porn actresses. But, I honestly don't think she means that (although I understand her point completely). It would be crossing a line for me, I would never go there.
So, in summary, my advice, for what it's worth, would be: Stay away from the friend (and break it off like a gentleman!)… Stay away from porn… try and reconnect with your wife, try and avoid masturbation, but if you have to, to release, do it the old school way, and try and not fantasize about porn.