Sounds like anal glands to me. William has to have his done every couple of months because they are slightly in the wrong place
(my vet describes them as floating) and just can't empty naturally. Luckily they haven't been infected yet and he's very good when he has them done. He always wags his tail at the vet and gives him/her Cocker kisses until the rubber glove appears. Then he sits down very firmly
but he's such a gentleman that he stands up as soon as I ask him to and buries his head in my shoulder until it's over and done with and he gets a liver treat from the vet.