Is it ok to use a car battery to power an inverter?
Only you can decide if a car battery is a suitable solution for the application. Is it a workable solution from a technical standpoint? Yes it will work but there are factors that you do need to consider to determine suitability.


Car batteries are heavy and large size. 
Lead acid car batteries are not usually sealed so there is danger of acid spill or escape.
Car batteries can source lots of current and if there is accidental shorting without use of adequate protection devices the massive current can do a lot of damage.
Charging lead acid car batteries leads to hydrogen gas production which can be dangerous if done indoors and/or in a confined space.
Connection of low current load wires to a car battery can be somewhat of a pain as regular battery terminals do not normally accommodate small wires.
You will have to evaluate the discharge rate versus available charging rate to determine if the down time duty cycle of the battery is too large for your application.
If usage of the battery capacity is done over a long time period there may be self discharge loss of overall capacity to consider.