Jan's excellent answer covers many important points in just a few words. I'll just add the likely explanation of your teacher's confusion.
Your teacher is probably aware that German relative clauses work exactly like English relative clauses in this respect. The problem, however, is that the situation surrounding the one English relative pronoun (who vs. whom) that still distinguishes nominative = subject case vs. accusative/dative = object case has become extremely chaotic in recent decades. See my answer to Is “whom” correct in “I speak of him, whom is…” over at English Language Stack Exchange. I'll quote the four major modern styles of dealing with who/whom from that post:
- Who is the subject case, whom is the object case. The case of a relative pronoun is determined by its function in the relative clause.
- The word whom is obsolete. It has been replaced by who in all contexts.
- The word whom is nothing more than a substitute for who that can be used wherever who can be used, to indicate formality.
- Who is the subject case, whom is the object case. The case of a relative pronoun is determined by the function of the referent in the main clause.
1 is the original rule that is part of the common heritage of German and English as (West) Germanic languages, and indeed of all Indo-European languages. 4 is a temporary aberration peculiar to English that arose in a situation where many native speakers want to make the prestigious who/whom distinction but get too much 'wrong' (styles 2 and 3) input to infer rule 1 from it. Rule 1 is traditionally taught in the short form consisting only of the first sentence. Combined with so many people using styles 2 or 3, it is a matter of pure accident whether someone interprets this as 1 or 4. Meanwhile the people using style 4 have reached critical mass and some have even started teaching their method under the misconception that it is the traditional, prestigious one. At this point you can't really blame anyone for using style 4.