The officials said the house being used by the Taliban to train suicide bombers was located adjacent to the bride's home that came under fire during Sunday night's attack.
A senior Afghan Defence Ministry official said the raid was against "a foreign terrorist group actively engaged in organizing terrorist attacks."
"During the operation, a large warehouse of the terrorists' supplies and equipment was also demolished," the official said.
A second Afghan Defence Ministry official said a foreign militant detonated a suicide vest that killed him and others around him, including a woman.
"The compound was being used to train men and women who were willing to become suicide bombers, we raided it. We are aware that civilians were injured in the attack," he said.
Attaullah Afghan, a member of the Helmand provincial council member, said 35 civilians people attending the wedding party near to the attack site in the Khaksar area of Musa Qala district were killed and 13 were injured.
A second provincial council member, Abdul Majid Akhundzadah, said 40 people, all civilians.
The Defence Ministry said the Taliban hideout was also used by foreign nationals working for the hardline Islamist group.
"As a result of a joint operation in Musa Qala district of Helmand, 22 Taliban members were killed and 14 others arrested," the ministry said in a statement, adding that five Pakistanis and one Bangladeshi national were among those arrested.
Bombing, air strikes and ground clashes between the U.S. backed Afghan forces and hardline Islamist groups have intensified following the collapse of the U.S.-Taliban talks and ahead of the presidential polls next week.
A senior U.S. defense official in Afghanistan said the operation was aimed against al Qaeda fighters but did not give any details about civilian casualties.
The United States in 2001 sent forces to Afghanistan to oust Taliban leaders after they refused to hand over members of the al Qaeda militant group behind the Sept. 11 attack on the World Trade Center and the Pentagon.
Since then, the U.S. forces have supported the Afghan forces in war against the al Qaeda, Taliban and Islamic State militant groups that recruit Afghans and foreigners who mount attacks against the Western-backed Afghan government and foreign forces.
The Taliban said Afghan soldiers backed by U.S. forces conducted a night air strike, followed by ground clashes between their fighters and Afghan forces in the Musa Qala district.Several civilians at a wedding party were killed and 18 members of the Afghan forces died in the fighting, the Taliban said in a statement.