I probably won't be winning any plaudits for a well-described story identification question given that I am trying to find the story that I dreamed about last night. Nonetheless, I am sure it is a real memory that I was dreaming about: of an episode from a story that was read out in the late 1960s or early 1970s as part of the long running BBC storytelling series for children, Jackanory. That would mean it originally came from a book for children published before then, presumably by an Australian author.
The scene I remember, that came back to me in the dream, is from near the end of the story. A bad guy - probably the main villain of the story - has chased someone (it could have been a child and their dog or it could have been just a dog) into into some sort of public garden in Australia. (I pictured the place as looking like the Palm House in Kew Gardens, where I had recently been taken, which would have made it a large indoor greenhouse - but that could just have been the way I imagined it. The key point was that it was a place where one wouldn't be surprised to find statuary among the foliage.)
The bad guy is about to triumph in some way, but at the last moment the dog speaks to him. And because he has heard an animal speak, the law of magic is that he turns to stone, presumably so that he can never tell anyone. He becomes just another statue in that garden and will remain so forever.
It served him right but it scared the living daylights out of me.