Sorry for the lengthy post but this is something I feel strongly about as I deal with it regularly in summer here!
I work as a dispatcher and call taker for a good size force here in the UK. Our local dog wardens are all but non-existent, and the RSPCA? Good luck getting them to even answer the phone- in 8 years of my job i have only known them attend ONE incident of a dog left in a hot car, and that was only because they were at the supermarket doors fundraising and got dragged over by a member of the public!
Obviously we work somewhat differently with animal control/ local police etc here in the uk, so this won't apply to many, but I don't know a single one of my workmates who would refuse to deal with a dog in a hot car call on 999 (the rest of us would lynch them!). Also, no matter how busy we are, we will always manage to find an officer to attend such calls.
As a call taker we cannot advise a member of the public to break a car window. *However*, we can give "advice" to the caller...

The offence of criminal damage has various points to prove, including 'without lawful excuse'. Section 5 of the Criminal Damage Act 1971 provides a list of circumstances whereby it would be held to be a lawful excuse and therefore a defence against a charge of criminal damage. [which includes] 'If the damage was caused during the protection of that persons own property if that property was in immediate need of protection and that the means taken to protect that property were in fact reasonable.' Under UK law dogs are regarded as property, so you could argue you were damaging an item of lower value property (window) to protect a higher value property (dog). Not your fault if you misjudged a £500 fancy power window as less value than a 'worthless' mongrel- you acted on good faith
I have this bit of legislation available to give to callers when we get the inevitable calls when the warm weather starts here. To my knowledge my force has never even come close to considering prosecution against a member of the public acting in good faith to rescue a dog left in a hot car.
Sorry for the legal gumf in the middle, but there are likely similar definitions in most countries to give us all that flexibility to act when needed. If I saw any animal suffering in a hot car I would act as I saw fit and to hell with the consequences, but it's nice to know that every once in a while our stupid laws sometimes can be twisted to protect us too
