No.
Frodo didn’t die in the lava in the book. He lost a finger when Gollum bit it off to get the ring.
Gollum then fell into the lava and perished.
I should add that Gollum would have perished shortly after anyway, because once the ring was destroyed, you start aging again and you quickly catch up to your where you should be, which in Gollums case was dust.