The suicide attack happened in Diyala, a province northeast of Baghdad, the capital, where Sunni fighters have carried out persistent attacks despite security gains elsewhere in the country.
The bomber targeted the home of a police commissioner who had been detained by US troops for allegedly co-operating with the Mahdi Army, a Shia armed group.
Major-General Abdul-Karim al-Rubaie, the military commander in Diyala, said most of the 22 fatalities were police and that 33 people were wounded in the evening attack in Balad Ruz, 70km northeast of Baghdad.
Al-Rubaie said police had gathered to celebrate Iftar, the meal that breaks the sunrise-to-sunset fast during the Islamic holy month of Ramadan, with Adnan Shukr al-Timimi, a police commissioner who was held at US-run Camp Bucca, a detention centre in southern Iraq.
Al-Timimi, who had invited friends and relatives to a banquet, and his parents and two children were among the dead, a hospital official said on condition of anonymity because he was not authorised to speak to the media.
Fighters are increasingly turning to women to launch suicide attacks because they can conceal explosives more easily under long garments and evade searches by male security guards.
In a similar attack on August 24, a suicide bomber blew himself up at a celebration to welcome home an Iraqi detainee released from US custody, killing at least 25 people.
The attack occurred inside one of several tents set up outside a house in the Abu Ghraib area on Baghdad’s western outskirts, according to residents and police.
Diyala remains one of Iraq’s most violent provinces. The US says suspected al-Qaeda in Iraq fighters have sought sanctuary in Diyala after being pushed out of other parts of the country.