It is possible that there is an infection present, but it may also be just very irritated. If he is licking at the area, you definitely need to take some steps to prevent this from happening, as that will just make it worse. Another thing that can happen is what is called urethral prolapse where the lining of the urethra (tube from the bladder to the outside) becomes swollen and sticks out a little bit from the tip of the penis. In severe cases, this bit of tissue may need to be amputated, but sometimes it is just from irritation and if he leaves it alone, it will be fine.
If the entire penis still appears very very enlarged, (even if it stays in the sheath), he should be rechecked for this. If it looks like it is just the tip of the penis and that is irritated and he has been bothering it, it is likely that everything will calm down if we just get him to leave it alone.
Do make sure he is urinating normally - if he is straining or passes only a few drops or spurts at a time, that would be considered an emergency situation and you should have him seen by a vet as soon as posssible.
While male dogs do get infections in this area, they are usually pretty superficial and can be handled by simply cleaning the area with water for a few days. These dogs will usually have a pus-type discharge present from the end of the sheath.
To prevent him from licking at it, you can try putting a T-shirt on him backwards - put his back legs through the the arm holes and his tail through the neck hole and pull it forward and tie it in front of the penis. You will obviously need to remove this to let him urinate. If this doesn't work, you can get one of those cones that will prevent him from licking at the area from either a petstore or a local vet.
Let me know if you have further questions.