Get Pet Questions Answered by Pet Experts
It sounds like your pet might be having problems with his anal glands. If this is the case, you need to see the vet for two reasons. 1 - you need to have glands expressed. 2 - your pet might need antibiotics to recover.
Infected or abcessed glands can be pretty painful so you will want to take care of this soon.
Let me know if you still have questions.