Possibly A Dream of WessexA Dream of Wessex (marketed as The Perfect Lover in the USA) by Christopher Priest, written in 1977.
https://en.wikipedia.org/wiki/A_Dream_of_Wessex
It has a dream within a dream, but is more influenced by a downbeat (Peak Oil) view of the future as lacking resources, as that was the mood in the UK at the time. The dream project is related to an effort to do a sort of simulation to discover a sustainable lifestyle. There is also an interpersonal conflict (the perfect lover aspect).
Priest has talked about how Nolan may have been influenced by his novel in Inception. (It was not a paid option, although The Prestige was...I think this sort of "borrowing" happens a lot in Hollywood...look at the obvious Heinlein juvie notes in Interstellar, or the whole Lion King versus Kimba thing.)
In any case, I think anyone looking for a novel in this vein will find the Priest book good. (There is a realistic surfing part of it as well, if you are into that.)
P.sS. MadeMade me think of this: