Translation:He treats me as if I were a stranger.
Actually, it isn't the verb ir, but ser. The point is the in some tenses a few conjugations of them are the same. If I were a student,... (se eu fosse um estudante,...) / if I went to the beach,... (se eu fosse à praia,..)
This translation is too literal and odd... I'm not English fluent, but I think "He treats me like I am a stranger" is better. Sounds good in English?
Both "He treats me like a stranger" and "He treats me as if I were a stranger" are fine and used regularly in English. The "were" is an English subjunctive form, which is why it looks a little weird. We would use it more in formal conversations or in writing.
One question about the possibility of ellipsis of the pronoun in the subject of the subordinate clause
I tried "ele me trata como se fosse um estranho" and got rejected. I know that “fosse” may be both 1st and 3rd person of the singular, buy there is little room, if any, for ambiguity, so based on what I learned it should be OK not to include the pronoun ”eu“.
Does Portuguese work differently than Spanish in this sort of sentences? (The Spanish translation is completely equivalent, even in the sameness of the conjugation of the verb for 1st and 3rd person singular, and the omission of the pronoun is admitted and even encouraged. In fact, to include the subject would serve to provide emphasis.)