Irritation, infection, anal gland impaction/infection, prostate problem's, rectal prolapse are a few possibility's. You should see your vet and they can begin to figure it out after examining your pup and talking to you if it's your pup.
Didn't find the answer you were looking for?