Ask your teacher why APA or MLA isn't being followed.
https://www.academiccoachingandwrit...a-style-in-academic-writing-words-or-numerals
https://penandthepad.com/write-out-numbers-mla-format-1079.html
The point of a paper, especially in the academic sense, which is what pretty much all school papers are, is to be concise and easy to read. Spelling out everything before 100 does not break that flow, or in MLA's case, anything that can be written in two words. Spelling out something in the thousands makes it harder to read.
If I were to make a guess, your teacher wants the student to break out of the likely habit in message board speak of using numerals for every number even when the call might be for a written out word, so has you do everything.
At my age, I'd be raising quite a bit of hell at my teacher for requiring this. In high school, I'd just go with what's assigned to me.