Cadee,it seems you already know where the foam piece goes,it's essentially there to prevent draughts,water and exhaust fume ingress by forming a flexible seal between cab and gas tank.
(Seeing you're from Canada it will also keep snow out!)
So in short,the answer is yes,ideally you DO need to replace it.
I'm sure there are plenty of trucks running around without as you already know they disintegrate with age but it would make sense to replace it while your tank is out.
I used a similar one that I found between the door card and inner door structure at the window winder handle from a F*rd Transit van,thankfully I haven't experienced any 'donor rejection' issues.
