A brief one, I would expect so, but I agree there are probably better ways to get it.
If you know it's in that rock, try lifting it out of the tank, leaving it in a bucket for like 30 seconds to a minute, then splashing it with tankwater (enough to only partly submerge it in the bucket), then lift the rock and swish it around to see if they bail out.
I got a couple of mantises out of my rockwork this way - basically they will retreat into their burrows for protection, but if you make it seem like they won't stay submerged, they'll run out to try to find deeper water the next time they get the chance.
Also worth mentioning that neither usually bores holes in rock (at least, not at any significant rate), so just having some kind of support structure going all the way through the sand will at least stop your corals/aquascape from shifting.