The men from the Albu Nimr tribe were killed in the Heet area, northwest of Baghdad, which was overrun by the militants earlier this month, a local leader and a doctor said.
A police colonel and a leader from the anti-jihadist Sahwa forces confirmed the killings.
Sources differed on the exact number of dead, with some saying as many as 48 were killed.
IS has overrun large areas of Anbar, and the killings are likely aimed at discouraging resistance from powerful local tribes, who will be key to any successful bid to retake the province.
Hundreds of Syrian tribesmen also killed, says rights monitoring group
Pro-government forces have suffered a string of setbacks in Anbar in recent weeks.
That has prompted warnings that the province, which stretches from the borders with Jordan and Saudi Arabia to the western approach to Baghdad, could fall entirely.
Images said to show the aftermath of the public ‘execution’ were circulated on Twitter, but their authenticity could not be independently confirmed.
One picture shows a line of more than 30 men in civilian clothes lying in the middle of a street with streams of blood running over the dusty ground, as young men and children look on.
The victims are barefoot and many are blindfolded, their hands bound behind their backs.
IS did not immediately claim responsibility for the killings, but has ‘executed’ hundreds of people in areas of Iraq and Syria that it controls.
Human Rights Watch says there is evidence the group ‘executed’ between 560 and 770 men — mostly captured soldiers earlier in the year.
And IS killed hundreds of members of a Syrian tribe that fought against them, according to the Syrian Observatory for Human Rights monitoring group.
IS spearheaded an offensive that has overrun much of the country’s Sunni Arab heartland since June, sweeping security forces aside.
Iraqi security forces, Shia militias and some Sunni tribesmen are fighting to push IS back, but have made only limited local progress so far.