Oh boy, not sure I should touch this one (I was going to say...with a ten foot pole but thought that pun was inappropriate...

oops I said it anyway). But, I doubt the dog 'enjoyed' it in the sense that we think he did/or didn't. I doubt dogs enjoy having ANYTHING done to them by a vet. But I also, think there is a more clinical way of extracting the semen than physically masturbating the dog.
Okay now I have to say this as delicately as possible... in all males, human, bovine (bulls), equine (horses) etc...and I believe canine too, there is a spot that is accessible through the rectum that when stimulated, i.e. touched, squeezed etc..., it causes instant ejaculation. I could be wrong about canines but I know this is how they harvest bull semen.
A friend of mine had testicular cancer and his doctor got a sample of his semen this way too so I would think that it can be done for dogs too. I would question a breeder that 'manually' masturbated a dog, but I don't pretend know anything about breeding dogs but I would still question it.
As to why this dogs penis was out of its sheath I can't say, but the redness and inflamation may just have been the normal appearance, they kind of look that way normally.