Looks like the remains of that pinky, plus the substrate that was eaten because of the red bulb. He may have more substrate inside him, and that's why his appetite is off. Soak him daily for at least a half hour, in a tub big enough for him to walk about in. The walking and scrambling to get out help move the poop through and out.
Yuck. It really looks like part of a bag. I'd assume it's something he ate before he arrived at your house. Better out than in. I hope he starts acting normal soon, please continue to let us know how he's doing. Have you been able to switch the bulb yet?
I've been out and bought a CHE, thermostat and calcium powder this morning. All fixed in now and I soaked him earlier and he done a normal ish poo, a tiny bit runny
I think he's on the verge of becoming his normal self again