The short answer is that yes, it’s perfectly fine to use a cigarette lighter inverter in your car.
However, the real answer is a whole lot more complicated than a simple yes or no.
While there’s nothing wrong with plugging an inverter into your cigarette lighter socket, or any 12V accessory socket for that matter you might have, there are some pretty hard limitations on what you’ll be able to power with that type of connection.
If the electronics you want to plug in draw less amperage than the cigarette lighter fuse is rated for, then you’ll be fine.
That’s typically about 10 or 15A, but you’ll need to check yours to be sure. If you need more amperage than that, then you’re going to have to figure out a different wiring solution. And, unfortunately, the alligator clips probably aren’t going to cut it.