Yes such a switch can be used for that.
I would never use a $20 battery switch. Get a Blue Sea ; https://www.amazon.com/dp/B01G5TAFWW/
Be sure to get one that will carry the maximum combined amperage of both inverters.