In today’s world, it would be difficult to have such a war. However, it is certainly possible to have wars without nationalism.
Today, people identify themselves very strongly with their country. Their preference for their own country over others leads them to be willing to fight when their country is in trouble. But this is not the only way that war can come about. For example, people can participate in a war not because they love their country but because they feel they must obey their leader. This could be because they revere the leader (for reasons having nothing to do with nationalism) or it could be because they fear the leader.
We should also note that civil wars are very possible without nationalism. You can have wars between factions in a country where both sides want nothing more than power. This is not nationalism and yet it can start wars.