I run a company that is developing ion thrusters.
There are a wide variety of tradeoffs in fuel selection for ion engines. The biggest tradeoff for conventional ion thrusters is choosing your fuel's atomic mass. Basically, you are applying an accelerating field of a certain voltage. A charged particle (an ion) in that field will accelerate to a certain velocity in that field that is inversely proportional to its mass. Think F = ma, where F in this case is the force of the electric field acting on the ion. If you change fuels (say from xenon to krypton, which is lighter), but don't change field strengths, then F stays the same, while m decreases, which means a (acceleration on the ion) must be bigger.
If you know the rocket equation, bigger acceleration on your ions is the same as higher exhaust velocity, which means you have higher ISP using lighter fuels. Sounds great, right?
EXCEPT! Here's the tradeoff: The thrust of your thruster is determined by the same equation: F = ma, where F is thrust in newtons, m is exhaust mass in kg, and a is exhaust velocity in m/s, but your ion velocity is determined by v = √(2qV/m) where v is velocity after passing through the whole potential, q is the particle charge, V is voltage of the potential, and m is mass of the particle. In this case, v in the second equation = a in the first. Velocity change at a given voltage varies as the square root of the inverse of the mass, while in F = ma, force varies directly with mass.
So, suppose you have two thrusters - one running krypton (medium mass particles), one running xenon (heavy particles). Suppose that you have a very efficient system for ionizing these particles, so that each particle always exits the engine with a +1 electric charge. Your accelerating voltage is 2000 V, and your power supply offers 2000 W, so you can run 1 amp of ions through the system (just to make the math easy).
1 amp of ions is the same number of particles regardless of which fuel gas you use, but it is not the same mass flow - more mass of xenon flows through the system to achieve the same current, because each charge in xenon is attached to a more massive xenon nucleus. Consider the v = √(2qV/m) math, then: pretend krypton ion mass = 1 kg, xenon ion mass = 2 kg (really it is 84 amu to 131 amu respectively, but the trend works at any scale so let's just make the math easy). If I apply 2000 V to each "ion" charged +1, then for krypton the velocity is √(4000/1) = 63.25, but for xenon it is √(4000/2) = 44.72. Plug that into F = ma, and you get F = 1 x 63.25 = 63.25 N per "ion" for krypton, and F = 2 x 44.72 = 89.44 N for xenon. So, same voltage, same amperage, same power, but xenon gives you 41% more thrust. You get less ISP from xenon compared to Krypton, but more thrust per watt of available power supply. It's like driving a car with less fuel efficiency but more horsepower.
And, with ion thrusters, you really want more horsepower in most cases. Ion engines are already very fuel efficient, and adding more solar power to enable the same thrust from a higher ISP fuel usually negates most of the benefit in delta-v you would get from the higher ISP, because now the spacecraft is heavier due to the extra solar panels. If you talk to the NASA engineers who built their best ion thrusters (and I have), they will tell you that gridded ion thrusters could be designed basically to achieve arbitrarily high ISP, but it would be stupid to do this because what you really care about is delta-v and how rapidly you can apply it, and running too high of ISP would make your power supply so heavy that your delta-v actually goes down.
So that's the biggest tradeoff, but there are others. Cost is one (Xenon costs like $3000/kg, which is the real reason a lot of newer Hall Effect Thrusters are using krypton these days). Plasma erosion is another (the plasma erosion rate defines thruster longevity and total fuel throughput capacity during the operating life - running too much ion current increases thrust, but also increases the erosion rate and kills your thrusters sooner). Tank mass is another (Lighter fuels tend to store at lower density, which means heavier tanks for the same fuel mass).
When you understand these tradeoffs, you start to see logic in the fuel selections for different use cases - for example, Amazon Kuiper will run krypton thrusters, because xenon would add millions of dollars to their costs, and they don't need much thrust to just maintain their orbits. NASA will fly xenon thrusters on all their interplanetary missions, because as you go farther from the sun solar arrays generate less power, and they want every bit of thrust they can get from every watt.
SpaceX Starlinks are a really unique case where they use argon Hall Effect Thrusters. Argon is lighter even than krypton, and SpaceX's published ISP numbers validate this, but they are also getting a lot of thrust from their design, which tells an experienced person that they are running it really hot - a ton of current, which will quickly erode and destroy the thruster. Normally, you would not do this, but SpaceX only needs the Starlink satellites to last for 5 years before replacing them, so the longevity of the thruster is not very relevant. Starlinks already have a huge power supply on board because they need it to power internet service bandwidth, so running really hot is possible without significant added cost for power supply. And, argon is super cheap, and the increased tank mass is not too relevant for SpaceX, as they get a pretty good deal on their launch costs. So, for them, it makes sense. For literally anyone else, not so much.
A few final notes: You asked specifically about Oxygen. You could run oxygen in an ion thruster, but not for very long. Most conductors are metals, and most metals will react with oxygen, even more so when they are hot, and the oxygen molecules have been broken apart during plasma ionization. Basically, you would pretty quickly rust your thruster out of existence in most traditional thruster designs.
One commentor earlier stated that you can only use noble gases - this is not accurate; the first ion thrusters used mercury as fuel, and recent tests using iodine have been quite successful; a bunch of other stuff has been tried too. What is true, though, is that for traditional designs (any design that has to deal with a plasma), you want a pure fuel - all the atoms need to be the same type. So, each atom from a pool of mercury is a mercury atom, each atom from an I2 iodine gas molecule is an iodine atom. With noble gases, this happens naturally, and they are very shelf-stable, not corrosive, etc... which makes them the preferred fuel right now, but they are not the only option. The reason you need a pure substance is that sparking a plasma will break every atomic bond in your fuel, but your ion optics can only be designed to handle one mass of particle. If you tried to run on water vapor, for example, the plasma would have hydrogen ions and oxygen ions mixed together, and if you optimize your engine to handle the mass of oxygen ions, the hydrogen ions will usually slam into the walls and cathodes and other thruster parts because you aren't controlling them properly - this leads to rapid corrosion that kills the thruster. So, you pick your fuel during the design process, and stick to it from then on.
Lastly, though, your intuition that an ion thruster can use just about anything as fuel is at least directionally correct. The thruster my company is developing makes ions by field effect ionization, which is such a gentle process that it typically does not break molecular bonds. If we are successful, we will be able to ionize molecular fuels and accelerate them without needing to make a plasma that breaks them apart. So, our target fuel is SF6, which offers slightly better performance than xenon at 0.3% of the cost, but in principle you could use this process on heavy molecules as large as carbon chain polymers or proteins (this is done in biotech labs all the time - it is how field effect mass spectrometry works). Theoretically you could run it on liquified DNA, though ISP would be so bad at that point that it wouldn't be worth doing - just burn the DNA for chemical thrust instead. SF6 thrusters are not a done deal yet, though - it remains to be seen if we can keep the temperature low enough to keep the fluorine atoms from dissociating in our SF6 gas - basically, if it gets too hot, we will have the same problem other thrusters have of particles of different masses doing bad things to our system, which will make us choose a different fuel. But, if we can keep it cool enough (below ~500 C) that it all stays SF6, every SF6 molecule has the same mass as every other SF6 molecule, and we will be able to design optics that handle that mass specifically, and a new fuel becomes possible.