If I borrow something may I do something which I believe improves that thing, without the owners consent? For example if I borrow a library book and find an error in one of the facts printed there can I write a correction in the margin?
He must beware not to break the terms stipulated by the lender. If he does, he is termed a gazlan (robber). He may not use the borrowed article for any purpose not stipulated, nor may he retain beyond the allotted time. [...] Frequently, too, the article is broken through the borrower's neglect. Even if he pays for it, this is still an injustice. The lender did not, in the first place, give him the article for such a purpose.
As such, one should ask the lender whether such an improvement is indeed beneficial to him. Absent such approval, I don't think one can make the hypothesis the improvement is always wanted (e.g., some people might be particular about not writing in their books).
A practical option is to write the correction on a note which you add to the book, and once you return it to ask whether they would like you to leave the note or correct the book directly.