This is according to the New York Times on Tuesday, which quoted unnamed administration officials.
The officials said that the opinion reached in recent months holds that there are exceptions to prior assertions that the Geneva Conventions apply to all prisoners taken in the Iraq war.
The report follows another story in Sunday's Washington Post, which said US intelligence officials were transferring detainees out of Iraq for interrogation.
In those cases, the CIA invoked a confidential justice department memo to justify its actions, the Post said.
The Times report said the legal opinion would allow the military and the CIA to treat at least a small number of non-Iraqi prisoners captured in Iraq in the same way as members of al-Qaida and the Taliban captured in Afghanistan, Pakistan or elsewhere.
In such cases, the US has said, the Geneva Convention does not apply.
The Times said that the new opinion represented a consensus reached by lawyers from the Departments of State and Justice, as well as other agencies such as the Pentagon and the National Security Council.
A government official told the newspaper that the opinion had been sought by the CIA to establish the legality of its secret transfers of non-Iraqi prisoners - beginning in April 2003 - for interrogation outside Iraq.
The status of prisoners in Iraq is
reviewed on a case-by-case basis
But government officials told the Times that the new ruling could open the way for additional transfers on a broader scale, because the status of prisoners being held in Iraq is reviewed on a case-by-case basis.
The administration takes the view that exceptions from the Geneva Convention would include suspected al-Qaida members and other "terrorist organisations", as well as foreigners who travelled to Iraq to join the armed fighters or engage in acts of terrorism, the paper said.