Hello, my name is***** and I have over 20 years of experience as a veterinarian. I am sorry to hear that Stuwert Little is uncomfortable, has been licking for a week and today has blood coming from his rectum.
With your description I believe that Stuwert is suffering from infected anal gland(s) or impaction of the gland(s). Rarely this can be the sign of a mass in the gland. Anal glands are scent glands located at the 5 & 7 o'clock position around the anus. If for whatever reason the glands don't empty properly or the discharge becomes too thick the gland overfills, may become infected and is painful, thus his licking.
If the glands are unable to empty eventually with nowhere else to go the gland can abscesses out through the skin. This is a common problem for dogs and seems to be more common in overweight dogs that are fed lots of table scraps or eat a diet low in fiber. These glands are normally expressed when passing stool but if he eats a diet low in fiber his stools may be too small or infrequent to empty them.
Dogs will scoot their bottom on the ground, even sometimes spinning in an attempt to empty their glands, or they may lick their bottom excessively. If he cannot reach his bottom very well he may just look at it quite a bit and grumble.
As far as long term prevention if this becomes a recurrent problem for him I recommend weight loss if he is overweight.
I also recommend decreasing or stopping entirely table scraps.
A diet higher in fiber, such as a weight loss diet or mature diet, may help. Sometimes a prescription food very high in fiber like Hills r/d or Purina Veterinary Diets OM is needed.
If he will let you touch the area he would benefit from a cool compress to the perianal area, patting dry and then applying a light coat of cortisone cream (like cortaid) to the area a couple times today and until you can have his anal glands checked.
Unfortunately the more he licks and scoots the more painful the area will be and the more tissue trauma he will cause. If the area appears red and he is licking then an e-collar (lampshade) is a great idea until he can see a veterinarian.
I know that he is uncomfortable but if he is still eating and drinking normally today then this isn't a true emergency, just see a veterinarian as soon as possible to check his anal glands. I understand that given this is a holiday weekend it will be difficult to get him examined over the next couple of days so try to get him seen today if possible. Do not feed him the day you take him in as they may need to sedate him to treat him.
If he seems absolutely miserable today though and your veterinarian isn't open then an emergency visit today is your best way of getting him immediate relief.
There are other reasons for perianal itchiness and discomfort, such as a flea infestation, tapeworm infections or a food allergy reaction but when we see bleeding too the most common cause is anal gland troubles.
Best of luck with Stuwert, please let me know if you have any further questions.