If you mean 6F22 9V zinc-carbon battery - this is VERY BAD idea.
1. You need much bigger battery (or a bit bigger modern LiIon or NiMH rechargeable battery)
2. Zinc-carbon is ancient type of battery and you can't draw such big current from it.
That kind of battery will be overloaded, may leak horribly. Stuff that leaks from that kind of battery is acidic may damage your PCB, hands, pants etc.
Converter with such design parameters (9V -> 5V/300mA) will draw about 150mA current from 9V, but there will be about 5-7V instead of 9V due to battery internal resistance/overload.
Maybe new battery will not drop that much, but after few minutes you may observe, that inverter draws even more (200-300mA), battery voltage dropped and overload is getting worst, because inverter tries to maintain output voltage.
For that load (5V * 0,3A = 1,5W) you need battery with 15Wh capacity.
Wh capacity = voltage * Ah capacity
10 hours discharge is safe for almost all batteries on the market.
To get close to 15Wh capacity you need
- 5 cells AA size NiMh 2600mAh 1,2V or
- 2 cells 18650 LiIon 3.6V 2000mAh
- 1 cell D size 13500mAh 1.2V (and boost converter)
There are also batteries designed for high current draw (RC model batteries, some modern NiMh), you can discharge their full capacity much faster than 10 hours, but they wear out faster. However I would not recommend them for you, just stick to 10 hour safe discharge.