At least six people have been killed in a bomb explosion at a funeral ceremony in the western Iraqi province of al-Anbar, police say.