No. The "atmosphere" on Mars is like 100 times thinner than on earth, and couldn't be harvested from the surface of the planet. So, now you'd some machine that is able to harvest enough co2 from the thin atmosphere to generate enough oxygen for a group of humans to breathe indefinitely. It's not a realistic solution.
Discussion
Plants do that but you'll need a LOT to produce breathable air. They tried that in an experiment on Earth called Biosphere 2 and had to give up in the end.
"The Martian" was pretty realistic in many ways btw.
Biosphere 2 cocked a LOT of things up, ngl.
Eight biomes was madly ambitious, and leaving soil carbon out of their atmospheric calculations was insanity.
But... an experiment only fails if we fail to learn from it.
The thing is we don't actually want to make a biosphere 2 on Mars. It is an interesting science experiment, but engineering madness. You'd engineer the passive conditioning with plants sure, but you'd also have two additional ECLS systems, a closed loop system for efficiency and an open loop system for error correction. It doesn't need to be as artificially hard as biosphere 2. Though I think they did open the loop a few times.