Figures of Speech: Inversion, doubt
You and your teacher may both be right, although your reading is more likely to be that intended by Dahl.
Typical inversion is that between subject (we) and verb (have), which is not the case here. But you might call this a kind of inversion too, since the adverbial phrase in almost every house is normally placed after be in the sense of being present at a location. Then the first line is an independent sentence, and the second line is a second independent sentence. In formal prose, you would not use a comma between those sentences, then, but rather a full stop or a semicolon.
However, a more likely interpretation is this:
In almost every house [that] we've been [in],
we've watched them gaping at the screen.
We read this as an omitted that. The result is that the first line is not a sentence but merely an adverbial phrase; the core of the adverbial phrase is in almost every house, and the that clause adds some information to this house, specifying that we are talking about only about those houses that we have been in.
This type of construction, with omitted that, is far more common than the one your teacher had in mind, so I think this is the best interpretation.