Yeah, be careful with the ankle. There is a reason why ski boots lock your foot into position. I once saw a girl twist her foot 90′ by just turning and her foot did not (wearing cleats on a soccer pitch). Not a pretty sight.
I would think the correct thing to do would be to ride out the slide. Hopefully your tire would gain traction once its moved off the sand it’s sliding on. But, that’s just my beginners opinion. I could well be wrong.