Can I rewire the cooker so I can use the gas oven without it being connected to the mains?
In these ovens the programmer (often called the "timer") contains the circuitry which controls the oven temperature. I don't think you can use the oven without a functioning programmer.

You would need an "off-the-grid" range and oven: https://bensdiscountsupply.com/premier-bak100tp-20-battery-ignition-gas-range-biscuit-with-black-trim/