It does not need quotation marks if it contains that.
If you want quotation marks, omit the that and just say
The teacher said “ I am cancelling the test.”
The overall tone was formal.
Jenifer Lawrence plays Katniss in the Hunger Games.
Not knowing the story or excerpt you are referring to, I can only help you by asking some questions to get you thinking about the correct answer. Is the village far away from other villages or towns? Are there many sick people in the village making the doctor want to stay away? Is there a lot of violence that the doctor is trying to avoid? What is it about the village or the people in it that the doctor would be trying to avoid? The answer to that questions is the answer to your question.
It would be it is a primary subject in the story that helps understand the hidden motives of the main character.