i also used He came in our apartment...means the same in English...except for those whose minds work a little differently
The two-way preposition in means "into" if it is followed by accusative case (with unsere), and "within" if followed by dative case (with unserer).
Yes, it might be fun to be juvenile at Duo's expense (and I certainly look forward to the day where I can make bilingual puns), but this sentence is actually completely unambiguous in German, so the best translation to English would use "into" rather than introduce ambiguity with merely "in".
And that's how a 1 letter difference might make you new friends... or at least gossip.
In this case, in the German sentence, is there something I can do in order to avoid ambiguity?
Yes, you make it unambiguous by choosing unsere instead of unserer. That clarifies that in unsere Wohnung is using the "into" meaning of in which pairs with accusative case. Since it's a two-way preposition, in can also mean "within" if you put what comes after it into dative case: in unserer Wohnung.
Is it also nasty in German , because then it would be a perfect translation? Or question: how would you translate: "he came in our apartment" into German giving it the same "nasty" meaning as in English.
No, it's perfectly fine to say "Er kam in unsere Wohnung" = "he came into our flat"
But it gets nasty if you'd say "er kam in unsereR Wohnung"
little difference, big effect
It's not the most common phrasing in English, and would sound a bit strange to use it without special purpose, but it should be correct. I recommend using "flat" or "apartment" or even "residence", but if you're determined to use "dwelling" you can report it.
So how would one say "He arrived at our apartment."? "Er kam zu unserer Wohnung."? "Er kam bei unserer Wohnung."
You'd use the (separable) verb "ankommen", which means "to arrive", I guess: zum Beispiel, "Er kam in unserer Wohnung an".
The interesting thing here (given the above discussion) is that you have to use the dative "unsurer" instead of the accusative "unsere". That's because "ankommen" is an intransitive verb.
(The standard disclaimer holds: I'm not a native speaker, and love to read corrections if something I write contains any errors.)
Just to add something to the unsere vs. unserer conversation: I find it almost impossible to hear a difference between a word that ends in "er" and a word that ends in "e". I would think that if someone had reason to say "Er kam in unserer Wohnung", they would really need to emphasize the "unserER", otherwise the listener would just hear that the guy entered the apartment.