David Cameron has indicated that he would be prepared to recommend to the British people that they should vote to leave the EU if he fails to secure major changes to Britain’s membership terms after a Tory victory in next year’s general election.

Amid renewed pressure on the prime minister over Europe after Mark Reckless became the second Conservative MP to defect to the anti-EU Ukip, Cameron said he was confident he would change the rules of benefits in the EU and would secure a British opt-out from the EU’s founding declaration to create an “ever closer union”.

But Cameron, who dismissed the defection of Reckless as “counter-productive and rather senseless”, indicated he might be prepared to recommend a no vote in his planned EU membership referendum in 2017.

Cameron told BBC1’s Andrew Marr Show: “I have said this all my political life – I’ve said if I thought that it wasn’t in Britain’s interests to be in the EU I wouldn’t argue for us to be in it. I am just a deeply patriotic politician and person. I do this job because I love my country, I care passionately about its future and I want it to be a strong, proud, self-governing independent nation.”

The prime minister raised the prospect of recommending a vote against continuing EU membership in his planned in/out referendum in 2017, after Reckless followed the example of his close friend Douglas Carswell by defecting to Ukip.

Like Carswell, who has triggered a byelection in his Clacton seat next week, Reckless has resigned his Rochester and Strood seat, where he will stand as the Ukip candidate in a byelection.

Cameron admitted that the start of the last Tory conference before the general election had been overshadowed by the defection of Carswell and the resignation of Brooks Newmark as civil society minister after sending sexually explicit images of himself over the internet. The prime minister said: “Well, I have to admit it has not been an ideal start. I think I am prepared to say that.”

But he dismissed the defection of Carswell as counter-productive on the grounds that he is the only prime ministerial candidate in next year’s general election who could guarantee an EU referendum.

Cameron said he did not know “specifically” that Reckless had been planning to defect but added: “He very rarely votes for the government and has made his views known. Look, these things are frustrating and frankly they are counter-productive and rather senseless. If you want to have a European referendum, if you want to have immigration controlled, if you want to get the deficit down, if you want to build a stronger Britain that we can be proud of – there is only option and that is to have a Conservative government after the next election.”

The prime minister said that he was confident he would succeed in negotiating major reforms to Britain’s EU membership. He said he would ensure that the final of the four original freedom of movement goals of the EU – capital, goods, services and labour – would be refocused to ensure that people can move around in the EU for work but not to claim benefits. He would also prevent EU citizens working in Britain from sending child benefit back home.

But Cameron made clear that restrictions on the movement of labour would only apply to future member states who would only be given full rights when their economies reach a certain level.

He said: “The right to go and work in France or Spain or Spanish people to come and do a job that has been advertised here. That is one thing. But it is a completely different thing to be able to go to claim benefits, actually even to work in Britain but to send your benefits home to your families that stay in your home country.”

The prime minister insisted that he believed he would be successful in his negotiations. “I want the 27 other countries in Europe to see that there is a plan here – that with reform can with reform can end with a reformed EU and a reformed relationship with Brtitain and Britain staying in,” he said. “I want them to see that that is the goal. If I don’t achieve that it will be for the British public to decide whether to stay in or get out.”