This is obviously just one scenario so no need to worry too much, i bet it could easily be swollen glands, but... My dog exhibited similar symptoms (scooting, licking anus) and he had tapeworms. I don't think fecal exams really help tho with tapeworm diagnosis (according to the emergency vet we took him to), so i would just watch him and his poop and make sure nothing weird happens. I figured it out when small, white worm-like things started coming out of his anus. Most positive diagnosis are made whenever the worms are taken to the vet apparently. He got a shot and was quickly better, no big deal!