This is a novel I read when I was young; it would have been sometime in the 1970s. I thought I remembered the author being Peter Dickinson, but I just checked a catalogue of his novels and found nothing that seemed similar (I suspect I was getting this book confused with his Changes trilogy, which I read at about the same time; there are some similarities in the setting but it's definitely not any of the Changes books).
Two present-day schoolboys travel (I don't remember how) into what they first assume is the past but then realise is the future. After some apocalypse, probably nuclear war, a medieval society has been rebuilt around a religion that forbids the wheel. I distinctly remember a scene where a heretic, accused of making a wheel, is executed by being tied to a giant (golden?) wheel and rolled down a ramp to their death. The two boys help overturn the oppressive regime (don't they always?), and then one of them returns to his own time, the other choosing to stay and help rebuild the world.
I remember a scene right at the end where the returned narrator doesn't know how to explain what happened to the other boy's parents, but it turns out one of the parents had dreams (presumably psychic) about what happened to their son and were willing to believe the truth.