http://www.vetinfo4dogs.com says this: (I bolded the part of the question and answer pertaining to what we've seen)

Q: We have an 8 month old Shih-Tzu/Maltese cross male who was just sterilized. Since the operation (3 days ago), he has not been able to walk properly (he tucks his bum under) and he seems very uncomfortable. He scoots his bum on the ground and also licks at his wound, then runs off crying. He won't eat on his own initiative, because he can't stand without pain. We have taken him back to the vet who thought it may be a burn wound from being shaven before surgery. We've tried an anti-inflammatory cream -- it seems to soothe him a bit, but he is very sensitive to us applying it. Do you think this is the problem or could it be something more serious? Also, and this may sound silly, but I have seen two round hard "balls" near the base of his penis intermittently (especially when he'd just woken up). We thought these were undescended testes, but the vet said his testes had descended into his scrotum before the operation. I have seen them again since the operation. What are they? Thanks for your help. J.

A: Once in a while we have a male dog who gets very sore after neutering. I am not sure why this happens in all cases but am suspicious that some are sensitive to suture material, that sometimes we tie the knots too tight making the skin feel pinched, that infection occasionally occurs in the suture line and that skin can get sore from the shaving process prior to surgery. Once in a while all these things seem not to be the problem and the dog still seems to be in pain a little. We like to use pain relief medications in these cases. Your vet can help with this, if necessary.

The two round objects you are seeing are called the bulb of the penis. It is really just one large area of spongy blood filled tissue but it has two lobes. These fill with blood rather dramatically when a dog gets an erection and do often have appearance of subcutaneous testicles alongside the penis. Many dogs continue to be able to produce an erection shortly after neutering and as many as 20% of dogs may be able to produce an erection long-term after neutering.

Interesting.