Here’s information from NHS on how long some viruses can live outside the body: https://www.nhs.uk/common-health-questions/infections/how-lo..., I think this indicates that (1) yes, viruses can, in principle, be transmitted through books, (2) time window for this is rather small, and (3) probability of infection is further reduced since we usually just handle the book and not, e.g. lick pages (so there might be greater probability for young children’s books). Altogether, looks like the danger level is on par with interacting with the regular outside world, e.g. door handles, staircase railings.
Conceivably, however, books could be a suitable attack vector for deliberate contamination with toxic substances and bacteria pores.
Famous literary example is the poisoned copy of Aristotle’s Second Poetics in the Name of the Rose (https://en.m.wikipedia.org/wiki/The_Name_of_the_Rose)