Provided there is air or oxygen, something FLAMMABLE will burn providing its ignition point is below the temperature of the lava.
Otherwise, the flammable material just gets hot or melt or change character, depending on what it is.
Years ago I worked as a toolmaker. That often involved heat treatment of metals, but sometimes a hard item needed to be annealed (softened) for further work on it. So the process was to wrap it in newspaper, tie it up with string, and bury it in a tray of iron filings. It was then put into a cold oven and the oven started. It was brought up to the required heat (usually around yellow hot, depending on the composition of the object), allowed to stay at that for a time, then the oven was switched off and allowed to cool slowly. The tray was then taken from the oven, the object taken from the iron filings, the string and paper were STILL INTACT, so you undid the string and unwrapped it from the paper.
So even though the paper was as hot as the oven, it did not burn because the carbon dioxide gases from the iron filings depleted all oxygen.
The object also did not get impregnated with carbon nor turn black, as the newspaper prevented direct contact with the iron.