The former prime minister, whose time as leader of the Conservative Party was characterised by deep splits over Europe, said the in/out ballot promised by Cameron was a necessary "gamble" for both the country and the party.
"The relationship with Europe has poisoned British politics for too long, distracted parliament from other issues, and come close to destroying the Conservative Party. It is time to resolve the matter," he said.
"I favour this referendum because I simply don't believe we can go on on as we are, year after year, prime minister after prime minster going to Europe being pushed by people to negotiate a victory equivalent to Waterloo," he said.
In a strongly pro-EU speech given at the Chatham House foreign policy think-tank in central London on Thursday afternoon, Sir John said that while the EU was far from perfect, to leave would be to "jump into a void".
But the former prime minister, who negotiated Britain's opt out from the single currency during the Maastricht negotiations in 1991, warned the "aggressive" stance taken towards the EU by some Conservative MPs was damaging and should be ignored by Cameron.
"Rebellion is addictive, and some members may be getting a taste for it," he said. "I learned twenty years ago that the parliamentary party includes irreconcilables who are prepared to bring down any government or any prime minister in support of their opposition to the EU.
"Members with Conservative heads and Ukip hearts cannot be placated. Whatever is offered to them will be insufficient. They will demand more. They will only be satisfied by withdrawal. It is, therefore, essential for the prime minister to rally the persuadable majority of the parliamentary party."
Sir John said that if other EU leaders believe Cameron has been forced to the negotiation table by anti-EU MPs he would be seen to be "acting under political duress, rather than principle and conviction" – and his hand will be weakened. He added: "The truly well-meaning will give him advice in private."
His intervention can be seen as a rebuke to many backbench Tory MPs who believe their decision to rebel against the prime minister in a Commons vote in which they demanded Cameron seek a cut in the EU budget actually strengthened the UK's negotiating position.
Sir John also rejected calls for a deal to be done with Ukip in advance of the 2015 general election. "I don't think we can or should do a deal with Ukip," he said. "The leadership of Ukip have a policy which is against the UK national interest, they want us to leave the European Union ... we can not make common cause with Ukip."
Sir John said he did not have a "shred of doubt" that he British interest in the short and long term was better served by being inside the EU.
He said: "Being inside the EU can often be frustrating; but outside, we would be at a serious competitive disadvantage. The tens of thousands of UK companies who trade with the European Union should think long and hard about the consequences of exit. So should their employees, numbered in millions. To leave, would be a jump into a void.
Sir John also said Cameron should overrule Nick Clegg and appoint appoint a "lead negotiator" within cabinet to be his "personal emissary" to European capitals as he tries to renegotiate Britain's membership of the the EU. He said it was vital the appointee be personally close to the prime minister, but shied away from suggesting a name.Suggest a correction