Conservative cabinet minister Ken Clarke has been accused of misleading parliament as confusion mounts over the government's plans to introduce secret courts ahead of this week's crucial vote in the House of Lords.

Campaigners claim the minister without portfolio gave the Commons wrong information about whether the ancient writ of habeas corpus will be undermined by the justice and security bill.

Habeas corpus, first used in Britain in 1305, is invoked to demand that a prisoner be released from unlawful detention and is regarded as one of the fundamental safeguards of liberty. Were secret court sessions, known as "closed material procedures" (CMPs), to be allowed in such cases, campaigners fear that those challenging their imprisonment could lose their case without knowing why, because evidence used against them, but deemed to be sensitive in terms of security, would be kept secret.

However, days before the bill sanctioning changes that will expand the use of secret hearings into the main civil courts reaches its final stage on Tuesday, critics say the government is still sending mixed messages over the use of CMPs in habeas corpus claims.

When asked earlier this month whether the bill would impact on such claims, Clarke told the Commons "no". Later in the same session, he amended his answer, reading out a note from a civil service lawyer which said that the government "can't envisage" a situation where habeas corpus would conflict with secret courts.

Yet the Cabinet Office has now confirmed that secret courts could be used in habeas corpus claims where a "judge has found that their use would be in the interests of the fair and effective administration of justice". A Cabinet Office spokesman added that Lord Wallace, advocate general for Scotland, had confirmed to parliament last year that this was a theoretical possibility and that the Home Office minister, James Brokenshire, had confirmed this was the case only last month.

However, Clarke, the minister responsible for the justice and security bill, told MPs that the issue of habeas corpus and closed material procedures had "bowled me middle-stump" and that the government "ought to be allowed to go away and consider the matter".

Campaigners say that the Commons has still to be updated on the issue, even though the bill reaches its final stage this week.

Clare Algar, executive director of the legal charity Reprieve, said: "Ken Clarke has misled parliament over the impact of the secret courts bill. He told the Commons secret courts could not be used in cases where someone's liberty is at stake, yet now his own department has been forced to admit that this claim was wrong.

"Under the government's plans, it will be possible to use secret courts in habeas corpus claims – the ancient right we all have to demand that we are either given a trial or released from custody."

The bill seems likely to have a tricky passage, with peers reported to be planning fundamental amendments that would ensure that judges are given complete discretion over the new system and that the courts are used only as a last resort.

Algar added: "This bill strikes at the heart of the principle that everyone has the right to a fair trial and that no one, not even the government, is above the law. Given the significance of these changes, it is disgraceful that we are seeing obfuscation and misinformation from ministers, even at this late stage.

"It is hard to see how anyone can now believe any of the reassurances given by the government on the secret courts bill. MPs and peers must do everything they can to stop these dangerous proposals from wrecking our justice system."

Campaigners point to the recent habeas corpus claim of Yunus Rahmatullah, one of two men detained by UK forces in Iraq in 2004, then subsequently handed over to the US and rendered to Bagram prison in Afghanistan, where he remains without charge or trial.

Reprieve brought a habeas corpus claim against the British government in 2011 because it had signed an agreement with the US under which Rahmatullah, 29, remained under UK control and the UK could request his return at any point.

The habeas corpus claim in the court of appeal was successful, forcing the UK government to ask the US to return Rahmatullah into its custody, so that he could be charged or released. The appeal court's ruling was later overturned after the US refused the demand.

Critics of the bill say Rahmatullah's case illustrates how, if secret courts are introduced, the government could claim "national security" reasons in such cases, making it harder to win as Rahmatullah's lawyers would not have been able to hear or challenge the government's evidence.

A spokesman for the Cabinet Office said: "Habeas corpus cases involving national security evidence are extremely rare. Under the bill, a CMP could only be used in such a case where a judge has found that their use would be in the interests of the fair and effective administration of justice. Even then they could only be used to hear those pieces of evidence which that same judge has found are national security sensitive."