I've got a variant of this problem as well.
My Sim is an Aquatic Ecologist and not a mermaid. When he's gone diving for various purposes, sometimes a dolphin appears and is "deciding whether he likes" my Sim. Twice now, the dolphin *might* have begun to accept my Sim - it's hard to tell. The dolphin swims away and my Sim is left splashing the water, patting the air, and making crooning noises at the non-existent dolphin, while phantom dis-embodied squeaking and chirping comes from where the dolphin used to be - if only he were still there.
I've never been able to summon a dolphin, so I don't know about this completely invisible business.
I would echo what others have said - it seems to be related to the queue. If you have other actions in your queue when the dolphin appears, he will leave before you've had a chance to react. This problem is exacerbated by the fact that the queue is slow to respond when attempting to interrupt actions.
UPDATE:
I have a dolphin friend!
I was very careful to not queue up actions while in the water near a buoy. That seems to have worked in my case. I'll do some more investigating to make sure.