Could it be that John was referring to “this scroll,” the one that he was writing?
Not trying to contradict your point, just playing devil’s advocate, because we CAN expect that challenge.
It is possible. I’ve seen that very point argued fairly persuasively, in fact.
That said, I think other passages regarding attempts to mock God also apply (see up-thread), so even if Rev. 22:18-19 is limited to Revelations, I think the overall point is still valid. JMHO of course.
“Could it be that John was referring to this scroll, the one that he was writing?”
That’s obviously what the intention of the verse was, since the Bible itself didn’t exist as a “book” when the verse was written.