Thanks for your query.Based on the facts that you have posted it appears that your 18 months old son has developed a paraphimosis
and a constricting band at the coronal sulcus an junction of the glans
and shaft of the penis.
You have to consult qualified Urologist
for confirmation and further treatment. He may need to get circumcised.In the mean while you can give him some antibiotics and some tropical antibiotic ointment for application locally anti inflammatory drug after consulting your family Physician,