Do I have to buy the exact edition of the book as noted in the course outline?

A simple answer is yes. A few times the contents are the same in different editions of a particular textbook yet the page numbers, the evaluation questions, diagrams and images might change. The class will follow the edition noted in the course outline and it will make your life a lot easier to use the exact textbook.

Yet in case it is difficult for you to obtain the prescribed version, check the contents of the slides and make sure it matches the relevant chapter of the textbook. If you find some topics missing from the textbook, consider getting the content from Wikipedia and/or another book.

Technically speaking, you can get all your contents from wikipedia and/or another textbook yet it could take much more time compared to following the prescribed textbook.