The legal authority for barring children from school rests with Dr. Willis, who said that although he was sympathetic to Mr. Krawitt’s concern, and delighted that he was raising awareness of the importance of childhood vaccines, such a measure would not be appropriate, given that there has not been a case of measles in Marin County for years.

“I obviously have to balance the responsibility to control communicable disease with everybody’s right to freedom, and the line right now would basically be if there’s a case in this school,” Dr. Willis said. “This is a decision being made and applied to a school community based on the fact that these children are collected together at the school.”

Steven Herzog, the superintendent of the Reed Union School District, said that Rhett Krawitt’s school placed medically fragile children in classrooms where as many students as possible were vaccinated. In Rhett’s first-grade class, he said, 19 of the 22 children have been vaccinated, excepting Rhett and another child who is medically fragile, and one whose allergies preclude vaccines.

Mr. Krawitt, though, says that not enough has been done to ensure real herd immunity.

“It’s not just schools where diseases can spread,” he said. “It’s the library, the playground, the airport, the whole community.”