A little-known power enjoyed by the Queen and Prince of Wales to alter new laws is due to be exposed after the government lost a legal battle to keep details of its application private.

The information commissioner has ruled that the Cabinet Office must publish an internal Whitehall guide to the way the senior royals are consulted before legislation is introduced to ensure it does not harm their private interests.

The application of the controversial veto was revealed by the Guardian last year and has been described by constitutional lawyers as "a royal nuclear deterrent". Some believe it may underpin the influence Prince Charles appears to wield in Whitehall over pet issues ranging from architecture to healthcare.

A judgment issued last week by the deputy information commissioner, Graham Smith, means the Cabinet Office has until 25 September to release the confidential internal manual. It details how the consent of "The Crown and The Duchy of Cornwall" is obtained before bills are passed into law and what criteria ministers apply before asking the royals to amend draft laws. If it fails to do so it could face high court action.

In the past two parliamentary sessions Charles has been asked to consent to at least 12 draft bills on everything from wreck removals to co-operative societies. Between 2007 and 2009 he was consulted on bills relating to coroners, economic development and construction, marine and coastal access, housing and regeneration, energy and planning. In Charles's case, the little-known power stems from his role as the head of the £700m Duchy of Cornwall estate, which provides his £17m-a-year private income.

The government battled to keep the manual secret, claiming publication would breach legal professional privilege, and a spokeswoman for the Cabinet Office said it was still deciding whether to challenge the ruling at the information tribunal.

Lord Berkeley, a Labour peer who was told to seek Charles's consent on a marine navigation bill, said the commissioner's decision was "absolutely right". He said publication could shed light on a little-known procedure that allows the prince and the Queen "to fiddle around with bills to make sure they don't affect their private interests".

"People will start thinking, what the hell is going on?" he said. "We are in the 21st century, not the 18th century and it is crazy to think they are even trying to do this. The royal family should give up this special privilege and we should all obey the law of the land. Just because they have private estates, private incomes and land from several centuries ago doesn't mean they should have the right to interfere."

The latest crack in the edifice of secrecy around Charles's influence on public life came after a legal scholar, John Kirkhope, asked for Whitehall's internal manuals on consulting the royals. He said it was "clearly in the public interest that citizens understand how laws are made and applied as well as the circumstances in which the Duchy of Cornwall is consulted".

Kirkhope was researching a university thesis about the legal status of the duchy and wanted to know how ministers decided whether new laws affected the "hereditary revenues, personal property of the Duke [Charles] or other interests".

The Duchy of Cornwall runs farms and industrial property, builds houses and acts as a landlord as well as taking responsibility for large areas of the natural environment in south-west England. Its interests often overlap with Charles's own in areas such as town planning where past interventions in public debate have seen the prince accused of abusing his influence to distort the democratic process.

In 2009 Charles caused a storm when he stepped into the public planning debate for the Chelsea Barracks housing development designed by Richard Rogers. He privately complained to the site's owner, the prime minister of Qatar, that the design was "a gigantic experiment with the very soul of our capital city". Rogers was promptly sacked and the scheme redrawn in line with the prince's tastes.

Kirkhope said evidence he had gathered suggested the process of seeking royal consent for draft bills was not a mere formality. "The correspondence indicates that the effects of the bills are explained to the royal household, including the Duchy of Cornwall, discussions ensue and if necessary changes are made to proposed legislation," he said. "Departments of state have fought to avoid releasing correspondence which gives some hint of how the process works and the Cabinet Office has resisted releasing details of the guidance which determines whether the prince as Duke of Cornwall is consulted in the first place.

"As a citizen of this country I have a proper interest in ensuring the process by which laws are made should be transparent and that those who are given special privileges should be accountable. That is demonstrably not the case with regard to the Duchy of Cornwall."

Earlier in August Kirkhope forced the government to release edited emails showing how the Ministry of Justice consulted Buckingham Palace in 2008 and 2009 over the detail of the apprenticeships bill and how it would affect the Queen "in her personal capacity". As an employer of 1,200 staff the royal household stood to be affected, along with thousands of other employers. The civil servants wanted to know "Her Majesty's intentions in relation to the bill" before its second reading in the House of Commons.

One email refers to a note from the Queen's solicitors, Farrer and Co, "setting out his instructions in relation to the application of the apprenticeships bill to Her Majesty in her personal capacity".

The official states: "I understand from our discussion today that it might not be possible for what they want to happen without there being express provision in the bill".

It echoes correspondence released last year in which a minister wrote to the prince's office requesting his consent to a new planning bill because it was "capable of applying to ... [the] Prince of Wales' private interests".

Buckingham Palace and Clarence House released a joint statement in response to the information commissioner's ruling. "The royal household understands that the Cabinet Office is considering the information commissioner's decision and next step," it said. "It would not be a matter for the royal household to challenge any decision."