For touching it should be avoided with most creatures. Any creature with a slime coat should not be touched as it is part of their protection against skin infections. Human skin on "fish skin" especially. Even rays and sharks can be affected. They are having skin issues with the mantas of Hawaii and Yap where they come in contact with humans. Also an issue with getting close enough to touch any creature is the risk of unintentional contact with something sharp on your gear, camera, etc...
I completely agree about the skin-on-skin aspect for sensitive creatures. That's another reason why no-gloves rules are lousy. Mantas get pink spots where they've been touched. On the other hand, if you want to fondle a ray, there's a great opportunity to do so in the Maui Aquarium where you can dive with, touch, and feed the resident eagle ray.
That said if you are "approached" by and octo, wolf eel, or the like letting them investigate you is probably less of an issue as long as you do what you strive to keep your contact with them to a minimum.
If I were a fish or marine mammal, I'd interpret "strive to keep your contact with them to a minimum" as a sign of fear and go into immediate attack mode. If a fish wants to hug me, I'll let it.
But "hugging" any fish is a bad idea.
Apparently Napoleon Wrasse are special. Here's are some quotes from the Palau Aggressor Captain's Log:
9/12-9/19/04: "Sweetie, the resident Napoleon Wrasse was letting everybody know she had missed us the last couple of months. As always eagerly awaiting her treat and hugs."
9/19-9/26/04: "Thursday back to Blue Corner because the demand was so high. Same action different day. Sharks patrolling and Sweetie, the Napoleon Wrasse, passing out hugs. German Channel next with a great red anemone, with some nice dives at Ngerchong Outside and Ngerchong Inside finishing of the day."
I recall that the cook on the Tahiti Aggressor got rather frisky with a resident Napoleon Wrasse there too.
Perhaps hugs are wrong, but I'm guessing the fish prefer it to the alternative: "The wealthier echelons of society in Hong Kong, Singapore and Taiwan have an insatiable appetite for the flesh of the Napoleon Wrasse. It is popular in this region to advertise one's wealth by paying upward of US$1,500 to dine on a single fish, or up to US$400 for a set of lips." [from PBS]