Allow me to provide a reply that has some actual content in it.
The short answer is - yes, sometimes, it can be OK to force entry in to a car
to do a genuine rescue on a person, or a dog.
In Queensland, it's called the defence of "extraordinary emergency".
As well as technical law, there are questions of fact and circumstance ("background') in play.
For a bit of actual information, which you can rely on to be accurate,
since it's written by people who actually know, have a look at
this, and
this.
Are you the rescuer, or the owner of the car?