I've often seen my friends dog drag it's ass along the carpet, does it have an itchy ass or worms or something. It lloks quite funny but I can't help thinking there is a serious side to it.
Almost always, that action by a dog is evidence the anal glands are impacted and need cleaning... usually a trip to the vet will suffice and takes about 10 minutes...
It's definitely a gland problem. I do it myself on my two at home every 2-3 weeks. If you're not fazed by doing it yourself there are plenty of websites with instructions or get your vet to show you.