Yes. مُعَلِّمْ specifically refers to someone who teaches, a teacher, an instructor or tutor. Compare it to the verb to teach عَلَّمَ. As for أُسْتاذ, it could mean a teacher, a professor or simply mister. It is often used to call someone Sir. In fact, that's its original usage. Its use to mean teacher comes from students often referring to their teacher as Sir. Its female form, أُستاذة can also be used as a polite title for a lady.