The bomber struck as condolences were being given at the funeral of the fighter from tribal paramilitaries battling the Islamic State group.
He detonated an explosive belt outside a mosque in Al- Mashahada some 40 kilometres north of Baghdad, the security source said.
The military command in the capital said the attack killed a guard and two civilians, while a medical source said that another 12 people were wounded.
Despite being under increasing pressure in both Syria and Iraq, IS cells remain active north of Baghdad.