Thomas Gray? No.
There's a nice history of the line here:
Well, rattle my bones!. Who wrote this, or why, I can't really tell and my toast is burning so I don't care to look further. Here's the relevant part:
In 1845, English poet Thomas Noel (allegedly) wrote, in “The Pauper’s Funeral” (there is some controversy over the authorship):
Rattle his bones, his bones, his bones / Over the stones, the stones, the stones / He's only a pauper, who nobody owns, / Nobody owns, nobody owns.
In 1922, James – impenetrability! -Joyce wrote in “Ulysses”, somewhere in chapter six:
The carriage climbed more slowly the hill of Rutland square. Rattle his bones. Over the stones. Only a pauper. Nobody owns. -- In the midst of life, Martin Cunningham said.
In 1929, the year of the great stock market crash, Al Jolson released “Sonny Boy”, the first record to sell over a million, then over five million, copies.
Climb upon my knee, Sonny Boy / You are only three, Sonny Boy / You've no way of knowing, There's no way of showing / What you mean to me, Sonny Boy ...When I'm old and gray, dear, promise you won't stray, dear / For I love you so, Sonny Boy ... Let me hold you nearer, One thing makes you dearer / You've your mother's eyes, Sonny Boy.
In her 1960 play, “The Lion in Love” – the title is also that of one of Aesop’s Fables – [Delaney] gives us:
So rattle her bones all over the stones, she’s only a beggar-man whom nobody owns.