Is one permitted to return library books during Chol Hamoed, even though he could also return them after yom tov? It would seem to me that it should be OK, since there is no tircha involved and carrying is permitted on Chol Hamoed, even for no reason, according to most poskim. Since one is allowed to go to the library on Chol Hamoed, he might as well take along the books that he needs to return.
Yes, this would be permitted as it involves no melacha [prohibited acts of work] on Chol Hamoed, and no special act of preparation for after Yom Tov, as you are going to the library in any case.
See Mishna Brura 539:38 that one should not do acts of preparation on Chol Hamoed for after Yom Tov, even in they do not involve forbidden melacha. However, in your case you are not troubling yourself in any additional way.