I'm sure you know that the book of ecclesiasticus is not in most Protestant Bibles.
it is in Catholic Bibles, but then they would also say that it's not right for an individual to read a verse and use it to criticize a church teaching.
looking at the whole passage,
My son, shed tears for one who is dead*
with wailing and bitter lament;
As is only proper, prepare the body,
and do not absent yourself from the burial.
17Weeping bitterly, mourning fully,
pay your tribute of sorrow, as deserved:
A day or two, to prevent gossip;
then compose yourself after your grief.
18For grief can bring on death,
and heartache can sap one’s strength.d
19When a person is carried away, sorrow is over;
and the life of the poor one is grievous to the heart.
20Do not turn your thoughts to him again;
cease to recall him; think rather of the end.e
21Do not recall him, for there is no hope of his return;
you do him no good, and you harm yourself.f
22Remember that his fate will also be yours;
for him it was yesterday, for you today.g
23With the dead at rest, let memory cease;
be consoled, once the spirit has gone.
http://usccb.org/bible/sirach/38
it looks to me like it is about how to behave at funerals,
and advice to avoid excessive grief.