I wonder if there's the same degree of ambiguity in this sentence in both English and Hindi - the preferred English translation definitely implies rats physically inside the book rather than a book about rats, but a previous sentence, 'The book has cows and dogs', had a similar construction (using में - I tried ke pas and was marked wrong), and definitely implied a book about cows and dogs. Some clarification from a fluent speaker would be great.
"Duolingo," in this case, is a group of amateur (in the best sense) contributors, who understood Hindi and English well enough to put together a course. I agree with you that much more vocabulary would be good, but much more of everything in this course would be good. I suspect they were rushed into releasing the course, and I hope they, or other contributors, are able to expand the tree and each lesson soon.
To write "There are rats in the book", you would switch "rats" and "in the book" in the sentence:
चूहे किताब में हैं । Rats are in the book. किताब में चूहे हैं । There are rats in the book.
There is another sentence in this lesson that shows this grammar point:
घास में चूहे हैं । There are rats in the grass.
I hope this helps!