My name is ***** ***** I’ve been involved professionally with dogs in the health and behavioral fields for over 18 years. It will be my pleasure to work with you today.
It is not unusual for a dog to get an erection if he has been licking his penis or humping an object. This behavior is fairly normal. However, the erection should resolve itself within about 10-15 minutes. In some case you will notice a swelling in front of the testicles which is also normal. This is called a bulbus glandis and helps a male achieve a tie (stuck together) when mating. This should also go down in about 10-15 minutes.
In some cases, the penis will become erect and get stuck outside the outer skin. It may be due to the bulbous glands in the penis swelling outside of the outer skin (prepuce). This makes it hard for the penis to return to its normal position inside the prepuce. Or the hairs of the prepuce at the opening may have become caught preventing its retraction. This can cause problems if it is not corrected. You can try putting a little lubrication on the penis such as KY jelly and gently roll the prepuce back and forth and see if the penis will return to it’s normal position.
You can also make a saturated solution of sugar water using warm water. Mix the sugar into hot water until some sugar is left after mixing. Take a hand towel and soak it well and place it on the exposed penis. Be sure it is not too hot. This will sometime draw the fluid out of the bulbous gland and reduce the swelling allowing the penis to retract.
If the penis stays erect and will not retract using above methods, you should have him seen by the vet. The vet may have to put the dog under anesthetize to lubricate and return the penis to it’s normal position. You can read about this here:
I hope this information is helpful to you. If you would like any additional information or have more questions please don’t hesitate to press the reply to expert or continue conversation button so I can address any issues you still have . If you do find this helpful, please take this opportunity to rate my answer positively so I am compensated for my time.