Fire induces when there is fuel and an oxidizer. As mentioned above, rockets in space carry their own oxidizer. They have a tank of liquid oxygen to carry out the combustion process. The commonly used fuels are liquid hydrogen or kerosene. There are many types of fuel-oxidizer combinations, but liquid hydrogen and liquid oxygen are mostly used because of their optimum efficiency.
It should be noted that use of oxygen as an oxidizer is not mandatory. There are many other types of propellants that can give combustion reaction.
It is a combination of solid fuel and solid oxidizer to create propulsion in rockets. Mostly Aluminium Powder is used as the fuel and Ammonium Perchlorate as the oxidizer.
There are some chemicals that are used as propellants because they result out a combustion reaction when brought in contact with each other.
Hydrazine, Monomethyl Hydrazine, and Unsymmetrical Dimethyl Hydrazine are some of the hypergolic propellants that are used with nitrogen as an oxidizer to start the ignition process.
These propellants are chemicals like Concentrated Hydrogen Peroxide or Hydrazine and are used with Iridium Catalyst. These chemicals on chemical decomposition release energy and eject mass. Usually, monopropellants are used in reaction control thruster that provides altitude control.
From this article, it is clear that though oxygen is an important component in the combustion reaction on earth, is not the only one required to propel a rocket. There are many substitutes for oxygen that can act as an oxidizer and carry out the propulsion system in rockets in the space.