Could the Martian atmosphere, which consists mostly of carbon dioxide, be converted to give oxygen gas?
Undoubtedly, given a sufficient power source.
From memory, the Martian atmosphere is mostly carbon dioxide. The Martian atmospheric pressure is MUCH lower than it is on Earth. If we were seeking a way to "terraform" Mars, it would be much be much more efficient to introduce a genetically engineered bacterium that could photosynthesize and utilize carbon dioxide and make oxygen. All of this is highly speculative and derives from the science fiction novels of my youth.