Good question, OP.
My first point would be that in-group preferences apply not only to biologically-defined groups (based on phenotype) but also constructed identities such as religious, ethnic, and national groups. Hell, even sports fans engage in the same behavior. This means that social groups are not innate or biologically-defined, in theory we could make an in-group for proletarians or revolutionaries or whatever.
My second point is that the in-group out-group dynamic
is not all-important in human functioning, even though I would agree that it does
probably have a biological basis inside of humans. I've worked with people of many races, ethnic groups, and nationalities. For the most part we didn't argue or fight over tribal shit because we were just trying to earn a paycheck and go home. Working adults have little time for petty shit.
These two points are why I believe that a multi-ethnic or multi-national socialist commonwealth could potentially survive in spite of those divisions. But we would probably need to provide a common culture and common symbols that people could adopt to feel part of the same "tribe." The pull of us vs. them
is strong in humans.
>The nazi then said something about the USSR having multiple ethnicities and that ethnic conflict erupted shortly after it fell.
That's true, but it doesn't prove that this will happen inevitably. Global capitalism functions very effectively even though it encompasses huge numbers of people from different nations, religions, ethnic groups - who all speak different languages. The fact that a system as chaotic as capitalism can function at a global level in spite of these divisions (and in fact, slowly tie these separate peoples together) is proof that we aren't doomed to ethnic conflict and division.