Lecturers tend to mention what chapters of the textbook you need to use. Unless specified, it's highly unusual (though not absolute) for them to test you on information that appears only in the text, but not the lectures. The textbook is often to help clarify, or give extra information, in regards to topics covered in lectures.
You can definitely go and photocopy it from the library, but there can be issues like the book being borrowed by other people, or photocopying getting expensive after a while.