It won't burn without oxygen in a vacuum. If you mean, in an enclosed space with air like aspacecraft in zero-gee, the astronatus have already tried that experiment with a candle on board the space shuttle. This is what happens:
The flame forms a sphere instead of the tapered-flame shape we are familiar with. The tapered flame shape that we see on candles on Earth is due to convection of air currents which depend on gravity which pulls the cooler (denser) air downward and displaces the hotter (less-dense) air upward. That's why stars are spherical, too.
Around the surface of the sphere, there is wax vapor and fire and smoke. As more wax burns, the flame seems to go out, but it has not really gone out. It is just surrounded with smoke and being cut off from oxygen. There is still wax melting and hot wax vapor burning very slowly, and it will stay hot for quite a while. Eventually, if you don't disturb it, it will go out, but it can stay hot for a long while.
[This is why there has to be air circulation systems aboard the space shuttle, or the astronatus would asphyxiate, smothered in their own carbon dioxide from their breath! They have to have something to circulate the air. On Earth, it happens by heat and gravity, just like the candle flame, so we don't die in our sleep. Or we roll over, but you can't do that in free-fall.]
Now, suppose you wave the candle...? If the fire has not yet gone out, the spherical shell of smoke and oxidized wax vapor is broken, and oxygen can reach the hot wax vapor again. There is a big POP! as all the pent-up hot wax vapor suddenly ignites, and the combustion product (smoke) expands in all directions!
This is why fire is so dangerous aboard a space ship: it can look like it has gone out but is not really out, and if more oxygen hits it, there can be an explosion.