@NeoNacho @misty While the book is out of the library, yes.
When it's been returned, libraries SHOULDN'T, at least not by default, but some do. This is DEFINITELY a question you should ask ANY library where you use materials (including electronic ones).
If they let you opt-in to retaining your checkout records, that's okay. Any other retention post-return is NOT OKAY (minus a couple of edge cases, e.g. special collections because people damage and steal stuff).
See my https://speakerdeck.com/dsalo/protecting-patrons-with-digital-vendors?slide=18