More than 18 people have been killed in a terror attack which targeted funeral procession in eastern Province of Nangarhar, local officials have reported.