Get Your Dog Care Questions Answered by Experts
I am sorry to hear that your dog is uncomfortable. From your description and the area, it sounds like he has an abel sac abscess. Anal sacs are located at about 4o'clock and 8o'clock and their purpose is to store scented material for release when defecating or marking territory.
These can sometimes become impacted or the duct can become inflamed preventing normal expulsion of material and an abscess forms. This will eventually rupture and once it does will feel much better. If he will allow it you can warm compress the area to help all of the pus come out.
Because anal sac abscesses are often so painful, I always send home pain medications or an anti-inflammatory and sometimes antibiotics to prevent spread of bacteria that may have set up camp in the surrounding tissue. Additionally because he will want to lick at the area, I recommend putting an e. collar on him to prevent him from causing self trauma to the area and making it worse. If you are near a 24 hour veterinarian you can take him in tonight so that he can be comfortable as soon as possible. If the sis not feasible for you or you are not near a 24 hours clinic, you can take him back to his vet in the morning. They should recognize the problem as soon as they do a thorough exam and look at his anal area.
Does this address your concerns about your dog tonight?