Your teacher was referring to the fact that all quantum operations are reversible, because they are unitary transformations. They can be undone. Since assignment can't be undone, it's not a unitary transformation and therefore can't be done by a quantum computer.
But! Our universe runs on quantum mechanics, so how can classical computers do assignment?
Well, if you have a bunch of qubits you know are zero, then you can swap them into your variable. This clears the variable, and now you can add in the value you want to be there. This process is reversible, and acts like assignment. It decreases your supply of known-to-be-zero qubits, but until the sun goes out we can make a steady supply of those.
That being said, the garbage you are swapping away affects how things interfere with each other. So quantum algorithms often include steps to get rid of this garbage by undoing part of an operation while keeping the result, or else they won't work.