Imagine a book that we lift it with a force that is exactly equal to the force of gravity so the forces cancel out and the book moves with a constant velocity.
so I'm guessing your reasoning is that the net force on the book is zero so the amount of work done on the book is zero. And you are absolutely correct - no work is done on the book and its internal energy doesn't change.
However work is clearly being done because if I'm lifting the book I'm exerting a force of $mg$ over the distance $d$ the book moves, so I do an amount of work $W= mgd$. The question is where this work is going.
The answer is that the work is being done on the Earth-book gravitational system. The work I do is being done on this system and is raising its potential energy. To make this clearer imagine the book is attached to a long spring. If I lift the book I'm doing work, but the work isn't being done on the book but instead the work is being done on the spring. As a result the length of the spring changes and therefore its potential energy changes. The change in the spring potential energy is the same as the work I put in.
Response to comment:
To use the spring analogy again, the source of the work is that your body is also acting like a compressed spring that expands and does work as the book is lifted. When you push upwards with your hand, your feet are pushing downwards on the ground so as you lift the book you are doing work to increase the distance between your hand and your feet.