Hi Michal,
I don't think that setup would do what you're expecting. It's likely that reducing the current supply to the inverter will just cause it to stop working - but maybe if it was made cheaply enough, the output might scale with the input voltage (probably not).
The cheapest / easiest way to change AC voltage is to use a transformer, but that's a fixed solution.
You can use a VARIAC (basically a variable transformer) if you only want to vary the voltage and not the frequency.
It's possible to turn DC into AC, but it will require a significant amount of design + control & some pretty beefy power transistors / heat sinks (depending on the power you want to deliver). Basically you adjust the DC power to the level you want, then use an H bridge circuit to switch it on and off to your output. Just putting out a square wave will work ok in some applications, but you can improve that by adding dead time between the positive and negative states to make your signal look more sinusoidal.
I put together a quick simulation to show the basics, but you can probably find a ton of info online if you really want to go down the road of making your own AC supply.