It's all about the ISBN number on the copyright page. It identifies each edition of a book. Just be sure the number on the book matches what the class requires to be sure you have the right edition.
Renting is a good way to save, and you don't need to worry about selling it later