Thanks for the question and thanks for using JustAnswer.
Let me ask you a few follow up questions and we can go from there...
Is your dog neutered?
How long has this swelling been present?
Is it red, itchy, smelly, anything else you can tell me?
Does it seem to be on one side or the other of his anal sphincter?
Is he feeling ok otherwise - eating, drinking, etc?
Thanks for the extra information.
no he's not neutered
it has been a little swollen for a few days on and off
it is no itchy or smelly it is a little red
it is on both sides under his anal sphincter
he is eating and drinking fine
he seems to be having a little trouble moving his bowels but I don't know if that is because his bum is sore or tender
we can touch the swollen area and it does not seem to bother him when we touch it
OK, thanks for the extra information.
I think there are a few possibilities here that should be pursued.
First and foremost I think you will need to see a vet asap. No matter what the primary cause, this could turn into a real problem if his rear is too sore to comfortably pass stool.
I think this could be an infected anal sac. There are 2 anal sacs located near the rectum that exit out through little ducts in the anal sphincter. They can become impacted, infected, abscessed and be quite painful. This will require a vet to empty and +/- flush and cleanse the area. Antibiotics and anti-inflammatory medication are necessary for effective treatment.
This could also be swelling and enlargement of the perianal area due to male sex hormones. Your dog is the right age to have some enlargement in this area and sometimes it gets extreme and can cause problems with passing stool. In this case, and in case the prostate is also enlarged and that is causing him pain on passing stool, neutering is the treatment that will cure it.
There are also miscellaneous more superficial perianal infections and even tumors and growths that can cause these symptoms you are seeing.
You really should plan to take him to the vet tomorrow. If he will allow it tonight, you could use a warm, moist compress to the area and then apply some neosporin to any red areas. If he is painful you can give him a buffered aspirin (NO tylenol or ibuprofen!!) tonight to ease the pain.
I hope this answers your question. If not, I'll be happy to follow up with you.