I wrote the literal translation too, and I thought that it was acceptable to use that expression in English to mean "I was mistaken for a student", but then I realized I only thought that because I know the Spanish version of the expression and it resembles the Portuguese version. After reading these comments, I searched for "I was confused with a student" in Google - there were only two results, and this comment page was one of them.
I disagree. I admit I'm from western Canada though I think what I speak is similar enough to American English. I would interpret "confused with a student" to be "confused [about something] just like another student". However, I would say "confused as a student" could have the same meaning as "mistaken for a student" if there is proper context.