Rocket engines can operate in vacuum, on Earth too if in a vacuum chamber with proper pump... That's useful to test some engines that expand the gases to a very low pressure. Cutting the nozzle to the 1bar diameter would not tell if the lower part of the nozzle, often uncooled, survives the temperature.
Even for small rockets, such chambers and their pump are an interesting challenge. I heard of a case at Estec where an electrical connector, like 1dm2, was just forgotten, leaving a hole. The experimentators noticed an abnormal suction sound but the pump achieved vacuum nevertheless and the experiment proceeded.
"Burning" needs a fuel and an oxidizer (though we might call a few recombinations "burning") that react to form new molecules. The oxidizer is often air, but not always. Hydrogen alone doesn't burn, oxygen neither. Hydrogen burns with the oxygen from air or with an extra supplied oxidizer.