My teacher always says: Practice so slowly as not to make mistakes, because when you make mistakes they stuck to your brain and one has to make a big effort to get rid of them.
...but really, this is BS if it is taken too literally. Ever seen a toddler falling on its nose or butt while trying to walk? Yeah, exactly, everybody does it. And somehow these falls do not get stuck to their brains, on the contrary, they are important tools - the famous trial-and-error-method.
You have to play in such a tempo that you actually DO make mistakes, but of course your teacher is right when he/she says that you "must not" make them, in the aspect that you have to deal with them at once. You must analyze them, think of a solution and then practice this solution until you get it right (and then practice a bit more to really affirm the right movements). If you just ignore the mistake and sort of hope that it will vanish by itself next time you pass that spot

you are in trouble. (I have done that a million times.) If you just ignore the mistake and tell yourself that it is all right anyway, because "it is good enough for them" as our old family joke goes, you will never get better. But the same goes if you play so slowly that you never make a mistake - this means that you are within your comfort zone and you will not evolve from there.
Playing slowly is a great tool, but it does not mean that you should play a whole piece like a snail because otherwise you would mess up bar 42 and 56. It means that you should practice bar 42 and 56 with care and try to isolate the mistakes, and to do this you first need to play slowly so that you can notice what really happens, where it goes wrong. Then you practice this troublesome spot, perhaps just two or three notes, and that is something you soon can do very fast. Extend the section a bit, practice it up to full speed, and there you are. You will probably have to repeat this procedure tomorrow, but after some days with this routine, the error will be gone.
I also recommend that you, when you have encountered a mistake, try to repeat the mistake once. "This is how it feels." Then you play the same sequence in the right way. (I still talk about two or three notes, not 13 bars.) You notice the difference. You play the mistake again, you play it right again, you play it right again, you play it right again ... In this way you gain full control of what you are doing.
This method it is the same procedure whether you are learning Mary Had A Little Lamb or the Waldstein Sonata. There was a time when I also thought that I must not make mistakes. As I inevitably made them anyway, I worked up more and more frustration with myself, as every mistake stung me like an aggressive wasp, making the journey incredibly painful. I have heard about old piano teachers who hit their students' fingers with a ruler if they made mistakes ... I hope it is a silly myth! Anyone today understands that this kind of teaching is absolutely detrimental - but therefore we should not "punish" ourselves either. And to play so slowly that you simply cannot go wrong is ... zzz ...
So I would rephrase your teacher and say: you must make mistakes, but after you have made them, you must never ignore them.