If its only been the once I wouldnt worry, probably had a bit of poo stuck and was wiping himself or he had a bit of a runny bum and so was cleaning himself.
If its a constant then check for worms. Worms make their bums itchy so if he hasnt been wormed for a while that may be it. If you can rule out worms then it probably is his anal glands.