Fleas by the anus. Worms by the anus. Impacted and/or infected anal glands - "scooty butt" behavior is common as the dog attempts to relieve the pressure. Given most people do well in treating their dogs for fleas and worms, impacted anal glands are probably the most common cause. A Vet can express the gland and even show you how to express them yourself (4 & 8 o'clock positions on the anus is where the glands are located).

Or it could be a more serious problem such as anal sac cancer which the Vet would have to diagnose.