The army unit was responding to intelligence on a possible meeting of high-profile militant leaders at the house in Latifiya, 40 km (25 miles) south of the capital, the sources said.
More than 170 people have been killed in blasts claimed by Islamic State in and around Baghdad over the past week, including at least 77 in three attacks on May 17, in the deadliest spate of attacks in the city so far this year.
In a separate incident in Latifiya on May 18, an army officer was killed and three soldiers were wounded when a roadside bomb struck their Humvee, the army sources said.
Recent bombings have cranked up pressure on Prime Minister Haider al-Abadi, who is struggling to solve a political crisis sparked by his proposed cabinet reshuffle or risk losing control of parts of Baghdad to Islamic State militants.
Away from the capital, Iraq's military is waging a counter-offensive against Islamic State, which seized around a third of the country's territory in the north and west in 2014.
The latest offensive saw counter-terrorism forces, backed by U.S.-led coalition airstrikes, enter the remote western town of Rutba on May 17.