It's not "improper" in any sense.
In speech it's unexceptionable, because the intonation is so very different that there's no possibility of confusion.
But your teacher's point, that it's generally a good idea to avoid using the same (graphic) word in different senses, is correct. Here's what Graves & Hodge (The Reader Over Your Shoulder) say about it:
The same word should not be used in different senses in the same passage, unless attention is called to the difference
If one searches in the kitchen-cupboard for a missing egg-cup and does not find it, though it is there, the chances are that it is doing duty as a mustard-pot—the eye refuses to recognize it as an egg-cup. Similarly, if the same word is used in different senses in a passage, the reader's eye will often fail to recognize the second word—it cannot grasp, as it were, that an egg-cup can also be a mustard-pot.
Among their examples is this:
From a newspaper report:
"The mob of frightened little children reached the fire-alarm, but were unable to reach it."