I believe the key to understanding this is to look at the broader context in which Jesus makes these statements.
Let's take a look at Jesus' entire paragraph here from Matthew 23:
Then Jesus said to the crowds and to his disciples, "The scribes and
the Pharisees sit on Moses' seat, so practice and observe whatever
they tell you-but not what they do. For they preach, but do not
practice. They tie up heavy burdens, hard to bear, and lay them on
people's shoulders, but they themselves are not willing to move them
with their finger. They do all their deeds to be seen by others. For
they make their phylacteries broad and their fringes long, and they
love the place of honor at feasts and the best seats in the synagogues
and greetings in the marketplaces and being called rabbi by others.
But you are not to be called rabbi, for you have one teacher, and you
are all brothers. And call no man your father on earth, for you have
one Father, who is in heaven. Neither be called instructors, for you
have one instructor, the Christ. The greatest among you shall be your
servant. Whoever exalts himself will be humbled, and whoever humbles
himself will be exalted.
It's clear that Jesus is speaking of a particular kind of teacher. He's not speaking of a teacher that instructs the best he can from scripture, all the time giving glory to, and pointing people to God, but he's speaking of a teacher that teaches to impress other people, so that he can be honored, have power over another, and have his ego stroked. There's a difference. One teacher teaches out of his desire for power and acceptance, while another simply repeats what he has heard from Jesus.
In other words, Jesus is prohibiting the disciples from being teachers in the sense that they hold power over one another and force people to do what they say, and judging people when they don't. Instead, the disciples were to teach others humbly, always looking back to Christ as the source of what they teach, being careful not to go beyond what it is that Jesus taught, and they should do so driven by the motivation to see people love Christ, not driven by the motivation to have followers.