It could be a nerve/spinal issue. My pug would bite at her back paws before a tumor was discovered on her shoulder blade, which then went into the spine and she lost control of her back legs. The test the vet did was to have her stand on all fours, and then would turn her back foot underneath her, so she was putting weight on the top of the foot. If she didn’t immediately flip the foot over and put the paw flat on the table to correct it, it indicated nerve damage. She didn’t…she paused about a full second before turning her foot over. I lost her to cancer about six weeks later, when she lost control of both back legs. Heartbreaking. I hope this is not the case for your pup.
Agreed. The dog could be in pain. I would try a doggy NSAID to start with.