My previous dog has done that twice, and my current one has done it once.
Both times for my previous dog it was because glass had unfortunately got stuck in his paw when he went on a walk. So it infuriates me when I see people smashing glass bottles etc outside, especially when it's smashed on grass where no one can see it.
My current dog, not too long ago had a sore at the bottom of his leg. Maybe caused by a wasp sting. He kept licking it and made it worse so eventually the vet had to give him one of those cones.
So maybe (hopefully) your dog hasn't broken her leg, however putting pressure on it might cause discomfort due to something being stuck within her paw, or there is a sore somewhere near the bottom of the paw.