There is stuff floating around in space - everything from asteroids to planets to molecules.
I was thinking - would it be possible to harvest stray oxygen molecules, compress them, and get breathable oxygen?
Even at the high atmosphere level, far below 'space' it is barely possible.
Look at Skylon, whose core focus is to inject enough oxygen from the very thin air, cool it and compress it very fast down to LOX to then use it as oxidizer, since normally oxygen at high atmosphere is not usable for this. I.e. Extend ability to run 'air-breathing'.
And Skylon is finally getting successes though not an actual flight yet.
Now extend that to actual 'space' and you can see how hard it probably is. Conversely the use case of breathing is significantly lower volume than collecting oxygen for actual use as oxidizer in a rocket.
Just trying to offer some boundaries to the discussion.
Theoretically yes. But it would take hell of a lot of time.
In all phases, the interstellar medium is extremely dilute by terrestrial standards. In cool, dense regions of the ISM, matter is primarily in molecular form, and reaches number densities of 106 molecules per cm3. In hot, diffuse regions of the ISM, matter is primarily ionized, and the density may be as low as 10-4 ions per cm3. Compare this with a number density of roughly 1022 molecules per cm3 for liquid water. By mass, 99% of the ISM is gas in any form, and 1% is dust. Of the gas in the ISM, 89% of atoms are hydrogen and 9% are helium, with 2% of atoms being elements heavier than hydrogen or helium, which are called "metals" in astronomical parlance. The hydrogen and helium are a result of primordial nucleosynthesis, while the heavier elements in the ISM are a result of enrichment in the process of stellar evolution.
Also have a look at this source: http://hypertextbook.com/facts/2000/DaWeiCai.shtml
The closer you are to a star, as in e.g. the Sun, (or planet with an atmosphere) the more atoms, dust and molecules you may find. But the difference in orders of magnitude is the most relevant aspect. The amount of atoms per cubic meter here near Earth's surface is just out of proportion to the amount of atoms in space. So the question would be how much volume (with how much efficiency) you might need to harvest before you can use the gas for e.g. your living environment.