Ding, dong, darrow,
The cat and the sparrow;
The little dog has burnt his tail,
And he shall be hanged to-morrow.
According to The Oxford Dictionary of Nursery Rhymes (1951), edited by Iona and Peter Opie, dogs actually were sometimes tried and "hanged" in the 18th century. Usually it was for harming human beings - not sparrows!
Thanks and Acknowledgements
This rhyme can be found in The Little Mother Goose (1912), illustrated by Jessie Willcox Smith. It can also be found in The Nursery Rhymes of England (1842) by James Orchard Halliwell.