It can be dodgy territory.
If it's almost Christmas break, and the kids want to give the teacher a present, then generally that's ok. That does happen. But in general, teachers and students should not be exchanging gifts, it can undermine the purpose of the classroom to teach things. Usually the school Principal has to keep an eye on things like that, and use their discretion as appropriate.
Sometimes teachers will offer a prize to a student who gets the highest test scores or wins a friendly competition, and that sort of thing can be ok, and serve as a valid incentive, but that sort of incentive should only be used very rarely by a good teacher, in my opinion... as someone who did that for a while.