If you have an agro dumping ability like Shadowmeld or Vanish or Feign Death, you can use any non-damaging attack on the pet. If it's the type of pet that will get angry at you and run over to nibble at your toes, use your agro dump and then wait for it to drop combat before attempting to battle it.
This doesn't work with all pets, since some just flee if you try to engage them in combat. But at least there's a chance they'll climb out of the ground or tree or wherever they're hiding.
Has anyone tested out the Hunter ability "Scare Beast"? Pets aren't really beasts, but it might be worth a shot to get stuck pets unstuck.