We did that to a can of beans when a couple of us went camping down at the creek when we were about 14.
I used to heat up canned beans on a camp fire when I was a boy too. You open the can about 300 degrees around leaving 60 degrees of the lid left attached to the can. Then you can use the fork of a branch to lift the can by the back edge of the lid to put the can right into the fire and also remove it when it has boiled enough.
Don't ever remember leaving the lid unopened.
When I had kids of my own, we did the same thing on trips into the forest but added hotdogs to the beans.
Now I take the grandkids. It's a great time for all of them to cook on a fire in the woods and also to carve their own spoons, poker sticks, a fire spit, and of course the requisite "bean can stick".
A squirrel, rabbit, or better yet a grouse or two on a spit makes the whole deal a lifetime memory.