The correct meaning of the word titolo in this phrase is described at the point 6.c of the voice that you cited on the Treccani. The whole phrase is actually quite ironic, and underlines the scarce value given to the books by the citizens.
The real gift here is the sinecura, a job that does not require any effort; to take care of something in which no one has the minimum interest. And "due lire" at the time were a significant amount of money.