Because you do not say what you think the rule to be or what your teacher said, it is impossible to clarify any disagreement between them.
The general meaning of "While the professor was lecturing, the students took notes" and "While the professor was lecturing, the students were taking notes" is the same. In both cases, it refers to actions that were taking place (lecturing and taking notes) during the same past period. We can use "took" because the fact that the note taking occurred throughout the period is already implied by the continuous aspect of the verb in the preceding clause.
Now a careful writer will prefer "took" if the note taking was materially less continuous than the lecturing, but will prefer "were taking" if the note taking was approximately as continuous as the lecturing.
"While the teacher was lecturing, the students occasionally took notes" emphasizes the difference between on-going lecture and fitful notes. "While the teacher was lecturing, the students were taking as many notes as they could" implies that the lecturing and note taking were very close to concurrent.
That takes us to the second example. Again, the general meaning is the same with either tense of "send": the sending of the message occurred during the same past period during which the lecture was being given. Because messages are generally brief, it is unlikely that the duration of the sending was even close to the duration of the lecture. Unless the message was very long, I would write "sent a message" rather than "was sending a message." If, however, I spent most of my time during the lecture sending messages to friends, I would write "was sending messages" rather than "sent messages."
To sum up, both forms are grammatical and have the same general meaning. Careful users of English will use the two forms to distinguish nuances of meaning.