I think the key here is to focus on Exploration. So for instance we have many different countries who have a presence in Antarctica. But they are not there to carve out territories. Though they did do that before the Antarctic Treaty - all those claims are now frozen. And they are all there to do scientific research. And have been no wars over territories in Antarctica. Plenty of friendly rivalry. But that's just fine.
In the case of space, we have a head start. Nobody has staked any credible claim to space - despite a few eccentric cases such as people claiming the Moon etc.
And the Outer Space Treaty has been signed by everyone who has even a remote chance of going into space - and by almost all countries in the world. And it makes it clear that countries can't own territories in space.
So outer space is like Antarctica - but without even the encumberance of frozen previous claims.
So - yes I think is well possible for exploration of space to be peaceful. Including Mars.
I see Mars as likely to be explored from Earth - or by telepresence from orbit around Mars - because of the risk of "harmful contamination" in the sense of the OST if Earth microbes are introduced to the planet.
And if we can get past this present day hang up on Mars as a place to colonize - and realize we are not at that stage yet - if we ever will be. If we can explore space in the same way we explore Antarctica - with small settlements mainly focused on science and discovery - and maybe a few hardy explorers and tourists as well - I see no reason at all why it can't be peaceful for a good many decades into the future.
As for longer term future than that - well one can hope that humans as a whole become more peaceful. If we don't - I can't see colonization of space succeeding myself - because of the fragile nature of the habitats. Of course I'm not talking here about the current rather idealistic pioneers But if we have millions in space - and have the same violent tendencies we have on Earth - wars and such like just as we have on Earth - those fragile habitats will not last long at all in the cross fire.
Especially with the powerful technology any space settlement will have, including spaceships that have to travel at many kilometers per second - and ways of moving tons of material around in the solar system - again at many kilometers per second. Even with all weapons of mass destruction prohibited - that technology in the hands of anyone with violent aims would quickly destroy other habitats and could not be defended against at least I can't see how it could. I don't personally think it is that likely that we will have the force fields or Star Trek like "structural integrity fields" in the near future to defend against them.
So we have to be peaceful, find other ways to resolve disputes - or we can't do it at all.
So, for now at least, I think best to explore Mars from orbit or by telepresence from Earth myself. So you only have robots or telerobotic avatars on the surface.
There's lots to find out, especially about origins of life, that's the main interest of Mars - and possibly even alternative lifeforms, maybe not based on DNA, even an ET microbe would be astonishingly interesting for biology, the biological "discovery of the century".
I don't think humans on the surface of Mars are a good idea at all at present, at least until we know more about Mars, and advanced a fair bit in understanding and technology. Also I can envisage some futures where we never send humans to the surface, or at least not until we can do that without introducing microbes to Mars (hard to see with present technology but in some future technology who knows).