President Hamid Karzai issued a statement condemning the "mass killing," which he blamed on the Taliban, and ordering an investigation.
A Taliban spokesman denied that the group was involved and said local commanders in the area knew nothing about the killings, news agencies reported.
Neyamatullah Khan, chief of the Musa Qala district where U.S. Marines have long battled Taliban insurgents, said the Taliban slaughtered the partygoers as punishment for the celebration.
Daoud Ahmadi, a spokesman for the Helmand provincial government, said all of the victims were beheaded but that it was not clear whether they had been shot first.
He later said that the victims died when shooting broke out during a fight between two Taliban commanders over two women, who were among the dead, according to the Associated Press. He said it was unclear whether the music and dancing triggered the violence and whether the dead were all civilians or possibly included some Taliban fighters, AP reported.
The killings of the two NATO troops occurred in a remote area of eastern Laghman province where the joint forces were on a patrol, said Sarhadi Zwak, a spokesman for the provincial governor.
There were conflicting accounts of the shooting, and it was not immediately clear whether it was part of a spate of "insider" or "green-on-blue" attacks on foreign troops by their supposed Afghan allies.
"According to reports, the Afghan soldier killed two NATO forces during a verbal disagreement, and the assassin was later gunned down, too," Zwak said in a telephone interview. He said he had no details about the cause of the dispute.
However, Noman Hatefi, a spokesman for the Afghan army corps in eastern Afghanistan, said the two NATO soldiers, whom he identified as Americans, were killed by accident, AP reported. Hatefi said the two were killed when an Afghan soldier fell and accidentally fired his weapon during an insurgent attack, AP said. He said the soldier then tried to run away but was killed by a U.S. aircraft that had been called in to provide close air support, the agency said.
The NATO-led International Security Assistance Force (ISAF) and Afghanistan's Defense Ministry confirmed the killings but did not elaborate. They did not identify the nationality of the foreign troops, but most of those stationed in the east are Americans.
The deaths bring to 12 the number of losses among foreign troops this month from attacks carried out mostly in joint bases by Afghan military men. Most of the foreign troops killed have been Americans.
The rise of insider attacks this year, unprecedented during the nearly 11-year U.S.-led war, forced NATO recently to order soldiers to carry loaded weapons at all times.
An ISAF spokesman estimated Monday that a quarter of the attacks stemmed from the infiltration of Taliban insurgents into the Afghan forces but that the majority of attacks had other roots.
The attacks come as NATO and U.S. forces continue to transfer security responsibility to Afghan forces ahead of their planned withdrawal of all combat troops by the end of 2014.
While foreign troops have largely been the targets of insider attacks, Afghan forces in recent months have also suffered losses from similar strikes.
The killings of the civilians and foreign soldiers was part of a wave of violence since the weekend in Afghanistan. Overnight, insurgents stormed an Afghan army post Sunday night in the Washir district of Helmand province, killing 10 soldiers, officials said.
Eleven attackers were also killed in the gun battle that lasted for hours in the arid and remote district, the Defense Ministry said.
Javed Hamdard contributed to this report.