Article IX: ... States Parties to the Treaty shall pursue studies of outer space, including the Moon and other celestial bodies, and conduct exploration of them so as to avoid their harmful contamination and also adverse changes in the environment of the Earth resulting from the introduction of extraterrestrial matter and, where necessary, shall adopt appropriate measures for this purpose...
Essentially all the major space powers signed this. Though note that militarization is not included (so spy satellites are Kosher), aside from weapons of mass destruction.
This is a contentious issue as right now the only way you're getting to Mars is with a national space agency and they get to vet your lander. But sooner or later, companies like Spacex will be able to do it and so far (see Starlink) they've proven to be fairly ignorant in terms of consulting with the research community. The rules for planetary protection are extremely strict because if you want to prove that there was life on Mars, your results are ruined if you accidentally contaminate the landing site. However lots of people think they're too stringent. For example, caves/overhangs would be a great place to set up a colony because there is natural radiation shielding. Of course this is also a prime spot for Martian life, for the same reason, so nobody is allowed to target landers anywhere near those areas.
Probably what will happen is we'll designate areas of Mars to be conservation areas where Earth contamination is strictly controlled or prohibited. See, for example, the Antarctic Treaty. There could be lower risk areas like open plains for colonies. I'm sure there are plenty of papers discussing this though.
I believe we have a civic duty to spread extremophiles across the solar system.
If there is life on Mars it's very likely much the same as our own and distantly related.
Gambling on the future of the only known life in the universe to satiate scientific curiosity is not worth it whatsoever.