I don’t know anything about opening a tank entry/exit hatch. But, I imagine both sides carry small explosives to blow it off.
But, YES, you are correct, the tank attacking soldiers would have to get their hands on them first.
Said small explosives are not normal issue for infantry and certainly not irregulars or militia like the Palis. Normally it’s the province of combat engineers or special operations troops. Infantry gets antitank munitions that generally aren’t going to get you in to a tank without causing injury or death to those inside.
Also worth noting that most Western tanks have the hinge or pivot mechanism on the inside/under the hatch/armor these days, so as to make blowing a hatch off far more difficult.