We were forbidden to accompany funeral processions but not strictly.
Sahih al-Bukhari Book 23, Hadith 39