My 18 months toddler has a green line near the gums of his front upper tooth. He slept with a bottle for some time can this be tooth decay? Treatment?

See dentist. It is well known that bottle-feeding during sleep can cause teeth problem . Consult a dentist.
Oh, my. this can be dangerous, may affect baby and underlying permanent teeth, and can travel through blood stream to damage other organs. Probably is decay from milk sugars being converted by bacteria (baby teeth need to be cleaned) into acids...baby bottle syndrome. 1st dental appointment should correspond with 1st b'day. Please call a Pediatric Dental Specialist (as opposed to GP) IMMEDIATELY.
It might be. Treatment really depends on exactly what the problem is. To find out, make an appointment with a pediatric dentist. This needs to be addressed.