While the identity of the helicopter was not immediately clear, Saudi Arabia, which is leading a coalition in the war in Yemen, has US-built Apache A-64 Longbow attack helicopters.
Despite more than two years of fighting, African migrants continue to arrive in Yemen, where a lack of central authority means they are free to travel onwards to Saudi Arabia.
He said that panic erupted among the refugees when the helicopter opened fire.
The UNHCR says that Yemen is hosting more than 255,000 Somali refugees.
The Shiite Houthi group repeatedly fire ballistic missiles against government-controlled provinces but most of the attacks were aborted by air defence systems of the Saudi-led coalition.
The UNHCR said in a tweet that it was "appalled by this tragic incident, the latest in which civilians continue to disproportionately bear the brunt of conflict in Yemen".
"As conditions in Yemen further deteriorate as a result of ongoing conflict, refugees and asylum seekers are increasingly resorting to move onwards from Yemen further north, taking well-established migratory routes". "It was a gruesome and heartbreaking scene". It also said that the dead included women and children. The IOM said it believed the boat had been headed for Sudan. The coast south of Hodeida has seen violent clashes over the past 24 hours, leaving 32 dead including 10 civilians, according to military and medical officials.
Some 85 Emirati soldiers have been killed since the coalition launched its intervention in support of President Abedrabbo Mansour Hadi in March 2015.
Yemen's Houthi rebels reported shooting down a Saudi Apache helicopter in Hodeideh province on Thursday. Saudi-led coalition aircraft had taken part in the assault, the same sources said.
A September 2016 report by the Yemen Data Project concluded that one-third of Saudi airstrikes hit hospitals, schools, and other civilian targets - figures which Saudi Foreign Minister Adel al-Jubeir told the Guardian were "vastly exaggerated".
Two missiles were fired at the mosque located inside the military camp of Kofal in the west of Marib after a rocket was sacked, the officials said.