If it were me...

I'd either just totally ignore his inappropriate comments and see how that worked, or speak up directly to him that his comments made me feel uncomfortable and wait to see what kind of response he has. If he responded in an inappropriate manner to my request, or continued to make comments, then I'd speak to my friend in a non-confrontational way and see what happens. If neither approach works, I'd make sure the hubby was not around when I wanted to spend time with my friend. If the wife responded inappropriately also then I'd reconsider whether it was a good idea to be friends with her.

But that's just how I would handle it, your friend may not want to go that route for herself.

Good luck to your friend.