Sounds like an acceptable way to control the inverter.
BUT this should only be done if the switch carries a control signal.
You can determine this by the gauge of the wires, if they are a lot thinner than the connections to the cars electrical system you should be okey dokey.
Don't do it if the wires carry the total input or output of the inverter. In this case the red wires will be as thick as the battery or cigarette connection wires.