The House of Commons has published a Briefing Paper which contains a list of confidence motions since 1945.
The most recent of these confidence motions in which an MP voted against their own party's government, as far as I'm aware, occurred on February 17th 1972, in opposition to the European Communities Bill.
During the debate, then Prime Minister, Ted Heath, stated that the government would treat the vote on the bill as an issue of confidence:
I must tell the House that my colleagues and I are of one mind that
the Government cannot abdicate their responsibilities in this matter.
Therefore, if this House will not agree to the Second Reading of the
Bill tonight and so refuses to give legislative effect to its own
decision of principle, taken by a vast majority less than four months
ago, my colleagues and I are unanimous that in these circumstances
this Parliament cannot sensibly continue. I urge hon. Members to
implement the clear decision of principle taken on 28th October last
and to cast their votes for the Second Reading of this Bill.
Despite this, in the 309-301 division on the bill, then Conservative MP Enoch Powell led a group of 14 other Tory MPs in voting against it. They did not have the whip removed for this, but Powell did dramatically leave the party five days before the 1974 General Election, going on to successfully contest his seat as a member of the Ulster Unionist Party.