My dog does that from time to time. If I give him a little birthday cake flavor ice cream, it will stop for a few days.
Yes, many dogs do that "scooting" thing when they have an itch on the anus. How are his bowel movements? Normal, or too loose or constipated?
Is his appetite good...or does he seem to have any bloating in his belly?
Worms can sometimes cause irritation lower down, so do you see any white specks like grains of rice in his poop?
But of course, all parasites aren't visible to the naked eye. You could maybe get a prescription multi-wormer from your vet, and see if that improves anything.
I suggest a vet prescription, based only on my experience in the past with my own dog. An over the counter one could make her vomit. but a prescription one never did.
Another thing to consider is possible intolerances or even some histamine reaction caused by his food. Check if his dog food is a very high quality. What do the ingredients look like? Some are just awful. Even if they look OK, there could still be something he's intolerant to, such as corn or wheat...or even beef!
You could try home cooking really good food for him and see if that makes any difference, but as advice from your vet about any possible supplement you may need to add to his diet if you home cook. Use human grade meats, fish, and vegetables. Cook plainly of course.
You can also add quinoa, rice, potato, or plain cooked pasta to his food for carbs (and quinoa has extra protein) Unless of course, you suspect he is allergic to any of those.
And are his anal glands okay? Many dogs, especially if they have softer stools, need their anal glands expressed every so often.That can cause irritation. Usually, with a firmish normal bowel movement, the anal glands can take care of themselves, but not always, so be mindful of that.