Using an oxygen device does not affect the validity of fasting because oxygen is a gas with no physical substance.
However, if medicinal substances with physical particles are added to the oxygen, its use would break the fast, as it enters the body cavity through a natural passage.