Wales' health minister apologised on Monday after she joked that the late Margaret Thatcher could be next for government.
Commenting on a reshuffle that saw David Cameron return to cabinet, Eluned Morgan said on Facebook: "What next? Thatcher's hearse arriving at No.10?!"
A spokeswoman for Ms Morgan said the minister has apologised for any offence caused. The message was deleted.
Tory MP Fay Jones said it was a "nasty little post".
Lord Cameron was made a peer on Monday and appointed by Rishi Sunak to be his foreign secretary in a reshuffle.
The move to give a great office of state to a Lord - who cannot be held to account in the House of Commons - was called a "disgrace" by a senior Welsh Labour MP.
Downing Street said the reshuffle "will give the prime minister a united team".
Former Welsh Secretary Alun Cairns said on X, formerly Twitter, that it was a "great appointment" that showed the Conservatives "are serious about governing and winning".
Plaid Cymru Westminster leader Liz Savile Roberts claimed the Conservatives had "no longer even a shadow of a pretence of democratic accountability".
Lord Cameron, who resigned as an MP after he quit as prime minister in the aftermath of the Brexit referendum result, was appointed as part of Mr Sunak's cabinet reshuffle.
In a Facebook post Ms Morgan said: "Talk about a full circle moment - the man who sparked a decision that divided the nation is now poised to save the government!".
She added: "What next? Thatcher's hearse arriving at No.10?!"
The post included a picture of Lady Thatcher's funeral hearse as it passed Downing Street in April 2013.
Laura Anne Jones, Conservative Member of the Senedd for South Wales East, said on X: "This is well beyond the pale, the public expect far better from their ministers. Her last sentence here is appalling. The Welsh health minister needs to delete this post and apologise."
Fay Jones, MP for Brecon and Radnor, replied: "Wouldn't it be great if her attention had gone to the Welsh NHS, instead of a nasty post like this?"
Ms Morgan initially removed the joke and picture of the hearse on Monday evening, before deleting it completely.
Lord Cameron took the place of James Cleverly, who has taken Suella Braverman's job as home secretary after she was sacked on Monday morning.
As a peer Mr Cameron will not be able to address MPs in the Commons.
Writing on X shortly before the appointment was confirmed, Sir Chris Bryant said: "It would be a disgrace to have a foreign secretary in the Lords especially at a moment of major political instability with war on the continent of Europe and a hideous conflagration in the Middle East."
The Labour Rhondda MP added: "We're a democracy not an elective dictatorship."
Labour's Shadow Welsh Secretary Jo Stevens said: "Just a few weeks ago, Rishi Sunak said David Cameron was part of a failed status quo. Now he's bringing him back as his liferaft."
Mr Cairns said on social media: "Having worked with David Cameron in Cabinet I have seen first hand his drive, commitment, and innovation.
"His experience will be invaluable. His appointment demonstrates Rishi Sunak and the Conservatives are serious about governing and winning".