I cleared a pet slot just to help test this, but had no luck. However, this doesn't mean that it can't be done.
I think there are two buffs at play:
* The not-in-combat burrowing in sand
* The in-combat burrow ability
The first ability:
If someone could manage to do this while the beast is still stuck in the first one, it might work. This one does not have a timer. Perhaps it could be preserved with Freezing Trap? This is the method I would pursue, but it does mean that later actions on the pet--probably including feeding and going into combat--would likely cancel the buff. It's quite possible that it also couldn't move, but without taming I can't be sure.
However, the second ability:
You can time the tame with either Immolation Trap or Serpent Sting, fairly easily, to end while the beast is burrowed (the burrow has a cast time and begins at ~50%, or 15k hp). There is no timer on it, but it does stop being "burrowed" after about 5 seconds, so I think that Rubybeam is right and that it's an ability. I'm not 100% on this though. Regardless, there is a caveat with using the second ability: although the crab can't move, the burrow gives it a -75% damage taken buff. This could potentially be abused, and I recommend against attempting to tame the crab with the in-combat buff.
Regardless, I'm having bad luck getting the abandon macro to work properly. Since they patched it, there's certain beasts that I have to try 20-30 times to get with this method. Lone Hunter is one I could never manage

Someone else may have more luck, but here's my suggestion:
* Use Freezing Trap if it keeps the out-of-combat crab in Burrow "form" when the tame begins; if not, try timing the tame to end when the crab passes 1/2 hp.
* Use the pet abandon macro while it's in sandy form, as the tame ends. Someone may have better luck than me.
* Once you manage to get the pet using the abandon macro (you will know it's successful because it will require a relog to see the pet), check to see if it retains its sandy form.