The state Assembly narrowly approved a measure to remove the religious exemption for vaccinations in the wake of a severe measles outbreak that began in communities with a high percentage of unvaccinated children in New York and is steadily spreading to other states.