Angela Merkel is prepared to grant David Cameron special assurances in a revised EU treaty to ensure that the interests of Britain and other non-euro members are protected in the European single market.

In a sign of the lengths the German chancellor is prepared to go to to ensure Britain remains in the EU, authoritative sources in Berlin say Merkel is also prepared to grant "limited opt-outs" to Britain and to ensure that EU regulations are enforced in a more flexible way.

One senior figure in Berlin has raised the prospect of giving the NHS an opt-out from the working time directive – a contentious measure criticised by Eurosceptics – which gives workers a series of rights.

The thinking among senior figures in Berlin has emerged on the eve of a visit to Britain by Merkel on Thursday in which the German chancellor will meet the Queen, address a joint session of parliament and hold separate meetings with the leaders of the three main political parties.

Downing Street believes Merkel will be the pivotal EU figure if Cameron wins the 2015 general election and embarks on a renegotiation of Britain's EU membership terms before a referendum by the end of 2017.

The Foreign Office is advising Downing Street not to lose sight of the fact that Britain will need the agreement of all other 27 EU leaders if it is to achieve a favourable revision of the Lisbon treaty. One source said: "There is perhaps too much optimism emanating from No 10. We have to be a very hard-headed about this and bear in mind that the bedrock of the EU is the Franco-German relationship. There is only so far the Germans will go. We should be making a much bigger effort with the French."

Senior figures in Berlin have outlined a series of concessions they would be prepared to grant Britain to help the prime minister win a referendum campaign. They say Merkel believes new governance arrangements for the eurozone will have to be introduced in "targeted" treaty change. This would go beyond a straightforward "simplified revision procedure" but would fall short of a full "inter-governmental conference" change that would take at least five years.

The prime minister regards treaty change as vital because it would hand Britain, which would have a veto, a chance to table its demands.

One senior Berlin official said: "Cameron's assumption that there will be treaty change is almost certainly correct. I am confident that a number of legal routes exist to get through changes in treaties, depending on political constellations. We are not speaking about rewriting the treaties but making targeted changes or submitting an addendum. It might extend beyond a limited treaty revision under the simplified revision procedure (on the model of the treaty facilitating the establishment of the European Stability Mechanism); but Germany does not want a general treaty revision."

The thinking in Berlin is outlined in a paper drawn up by the City of London Corporation and the Policy Network thinktank. Officials told the authors of the paper that Berlin is prepared to countenance offering:

• Assurances that Britain and the nine other EU members outside the euro will not be outvoted when rules are drawn up for the single market, which covers all 28 members. Cameron has voiced fears that the non-euro members could fall victim to "caucusing" by the 18 members of the euro because the rules of the single market are decided by "qualified majority voting" in which no member state has a veto. One senior official is quoted as saying: "Germany is sympathetic to British demand for assurances of non-discrimination in single market given eurozone integration. However this cannot extend to a reversion to unanimity over financial services regulation. […] In negotiations on a new treaty, I could see the inclusion of a new clause to protect the UK against discrimination as a euro out."

• Limited opt-outs for Britain, though these would fall short of repatriation of powers. One idea is the NHS exemption from the EU's working time directive. British workers can opt out of the 48-hour working week but other requirements in the directive, such as holidays and rest breaks, are mandatory.

• The implementation of EU regulations in a less intrusive and prescriptive way. This would apply across the EU and would be designed to meet British concerns that EU regulations fail to take account of the concerns of businesses.

A senior Berlin government adviser is quoted in the paper as saying: "There is too much lifestyle regulation coming out of Brussels. It is important that the EU looks at its core business in times of crisis and does whatever it can to promote economic development. Germany might be prepared to countenance the abrogation of some secondary legislation."

One senior Whitehall figure said that Merkel was keen to help Cameron but there were lines she would not cross. The source said: "Angela Merkel wants Britain to stay in the EU and wants to do what she is able to do to help with that. But she is not simply going to throw over key German interests and that includes the stability of the euro.

"Merkel and Cameron have a shared vision about the existential economic challenge facing Europe as a whole – the need for competitiveness, to see the emerging economies as an opportunity as well as a challenge. She regards Cameron as one of the few European leaders who gets that. It is true she wants us in because of where the balance of the economic argument lies and also because a British exit would damage the EU in the eyes of the world beyond."

But Sir Menzies Campbell, the former leader of the Liberal Democrats, said the Tories were wrong to think Merkel would be able to grant major concessions. Campbell said: "Anyone who believes that Merkel, who is after all the leader of a coalition, is going to come to London with the kind of agenda that would satisfy the most rabid anti-Europeans in the Conservative party has got another think coming. Germany and France have been the engine room of the EU, often resentful of the fact that Britain appeared from time to time to be disconnected. Why should Merkel offer some kind of unique relationship for the UK under a Tory party which embarrassed her by leaving the European People's party [in the European parliament] as soon as the 2010 election was over?"

Gareth Thomas, the shadow Europe minister, said: "These remarks by a senior Berlin official on the eve of the chancellor's visit simply confirm that the gap between what Conservative backbenchers are demanding and what Mrs Merkel is offering remains unbridgeable. Europe does need to change, but the tragedy for Britain is that since being elected, David Cameron seems to spend more time negotiating with his backbenchers than with other EU leaders."

Cameron and Merkel's bond

David Cameron and Angela Merkel have forged such a strong bond in recent years that aides like to debate the exact moment when they clicked.

There was the time when they went for a walk minus aides, accompanied just by their security detail, up Coombe Hill near the prime minister's country residence in Chequers in the Chilterns in the autumn of 2010.

Then there was the box set of Midsomer Murders DVDs Cameron handed to the German chancellor at the end of the Chequers weekend after they had spent hours watching Merkel's favourite detective drama.

Others say it is important not to forget the prime minister's visit, accompanied by his wife and children, to the German equivalent of Chequers at Schloss Meseberg in April last year. Merkel is said to have been particularly attentive to the Cameron children.

The strength of their bond shows that the two leaders have come a long way since Cameron announced during the Tory leadership contest in 2005 that he would take his party out of the main centre right grouping in the European parliament.

Even before his appointment as prime minister in 2010 Cameron worked hard to rebuild relations with Merkel who now regards him as a "naughty nephew", one No 10 source told the Mail on Sunday.

Cameron calculated that he would be unable to achieve much in Europe without the support of the leader of the EU's largest country and economy. Merkel was encouraged by Cameron's relatively constructive approach towards the EU after he became prime minister.

But their relations suffered a blow at the end of 2011 when Cameron vetoed a fiscal compact for the eurozone, forcing the eurozone members to agree a separate treaty outside the architecture of the EU. The fallout from that row, which prompted fears in the German chancellery that Britain could leave the EU, ended up strengthening their relationship. Merkel advised Cameron in the run up to his major speech on Britain and the EU in January last year to argue in favour of reform across the EU. She said that would be the best way of building a consensus across the EU.

The German chancellor is determined to see Britain remain in the EU. But the Foreign Office has warned Cameron to bear in mind that any German chancellor will also put Berlin's relationship with France first. Nicholas Watt