It is a factual error, according to IMDB and MovieMistakes -
When Stanley is reading in the synagogue and closes the book, the book was upside down as can be seen by the Hebrew letters.
When Stanley is at synagogue practicing for his Bar Mitzvah, and the Rabbi tells him to close the book, he does so - and a clear shot of the book cover from Stanley's left shows that the book (in Hebrew) is upside down. Hebrew books read right to left - the cover should be on Stanley's right, right side up.
Popcholent even wrote a full article titled What 'It' got wrong about Judaism
However, the movie got something very wrong. In an early scene, Stanley (the Jewish kid) is standing in the synagogue, struggling to recite the Torah aliyah blessings. His father, who happens to be the rabbi, is upset because it makes him look bad.
In a close up shot, you can see that Stanley is holding his chumash upside down!
The article goes on to suggest a some possible (in-universe) explanations as to why this happened:
There are a few logical in-universe reasons why Stanley could have held the book as such. Chances are that Stanley had memorized the blessings rather than try to read the Hebrew, thus he was not even paying attention to how he held the book. Or perhaps he was holding the book correctly, but the cover was bound the wrong way (I have seen this happen at least twice).
Personally I think that Stanley memorising what he had to say beforehand is a pretty good explanation, although there is no evidence to prove it was intentional and not just a mistake.