Massachusetts high school students would be required to stay in school until age 18 under a bill approved Thursday by a legislative panel hoping to reduce the number of students who drop out of school.