Hi thwasapon -
Dogs can still get an erection after being neutered- they just won't be producing any sperm. Since the testicles are removed at the neutering surgery, and the testicles are a major source of testosterone which contributes to their sexual drive, , this is much less likely to happen after neutering, but it is still possible.
Sometimes the penis can become stuck outside the sheath because of hair or the tissue of the sheath, or something else constricting around it that prevents it from sliding back into the sheath. If this happens, it is more serious because if the mucous membrane tissue on the outside of the penis becomes dried out, the tissue can become damaged. In extreme cases, this can require amputation of the penis.
If what you are seeing is just an erection, it should go away on its own if you leave him alone and don't handle him,, but if the penis appears to be stuck outside the sheath and it has been this way for a couple of hours and shows no sign of the swelling going down, this could be more serious. If the swelling is not too extreme, you could lubricate the penis with some KY jelly to try to help place it back into the sheath, but this needs to be done very gently. If you are unsuccessful or the swelling is quite extreme, it would be better to have him seen by a veterinarian.
I hope this answers your question. If so, please click Accept. If you need additional information, please let me know.
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.