How would I convert a 4.1(ish) volt li ion battery to 240v ac?
The device, or circuit, you are looking for is called an inverter.  You are right that it has a transformer connected backwards, but it also has a lot more besides.  A block diagram of a typical inverter system might look something like this:







simulate this circuit &ndash; Schematic created using CircuitLab

The H-Bridge is used by the controller system to generate an alternating current (AC) waveform. The transformer then steps the waveform up to the target voltage.

It's not a nice clean sine wave like you'd get from the mains, but instead what is called a "Modified Sine" wave (green line in this graph):

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Due to limitations in the way the H-bridge works there has to be a gap (or dead zone) between driving in one direction and driving in the other.  This gives the waveform its characteristic three-level appearance.

Inverters are not a very efficient system, since a proportion of the power is wasted as heat and even noise (they usually hum).  It is far better to find a low voltage solution to your problem.  Most appliances nowadays (excluding normal white goods) actually run on low voltages, and contain a power supply to reduce the voltage down to the typical 12V/5V/3.3V that you find everywhere now.  A much better solution is to find products that allow you to bypass that power supply and provide the needed voltages (or a subset of them - typically 12V is used) directly to the device.