He needs to have his anal glands expressed. It IS something that you can do yourself once your vet shows you how to do it, but it's a gawdawful messy job, so you're probably better off making an appointment and just having it done. Usually the dog's normal bowel movements cause the glands to be expressed, but sometimes they become impacted and when they do, you end up with the situation you have now. It's nothing serious and a fifteen minute vet visit will correct it.
Ghilly
Sounds like an anal gland problem.