It continued to run, even after you unplugged both batteries? And stopped when you pulled the wire off the IP solenoid??? What do you have in your truck that has it's own battery? Do you have something like a jump box, plugged into the cigarette lighter? Something has it's own power and is backfeeding.
It's not impossible for the engine to keep running after you disconnect both batteries. Although usually, it will go into runaway mode.
But to keep running with both batteries disconnected... And then to die if you unplug the fuel solenoid... That HAS to be the fuel solenoid getting power from somewhere besides your batteries.
An IDI will continue to run with the batteries disconnected ,as long as the Alternator in working. My 88 would do that. The rod in the column broke, and I had a switch to control the pump (basically just broke the hot wire to the pump). If that switch was closed, and the batteries disconnected, it would continue to run just off the alternator.