I fold up a loaf tin - more robust than foil and already preshaped. Any tiny holes can be pinched shut, but generally I'd keep it folded until needed and then once open keep it that way, to avoid wear.

Boiling in holes in the ground, birch bark containers, paper cups etc. is great knowledge for a tight spot, but as the ability to boil and cook is pretty fundamental, I'd try to find space for a foil pan - mine squashes really small.

FWIW, Rays Mears (British bushcraft guru) rates a decent cook pot second only to a knife, because they are so hard to improvise.