In the past two years of college experience, I've tried to minimize the money spent on textbooks so far as infringement on my grades or copyright laws are avoided. The way is to categorize textbooks (or the courses themselves) into two types. The first requires rote memorization of facts or theories, and the textbook usually does not present many "principles"; and the second requires you to understand and sometimes duplicate the deduction of theorems, or analyses of numerical or practical problems.
In classes pertaining to the first category, you can expect the materials to be memorized be provided by instructors in lecture notes and handouts, and as long as those are handled well the exams should be an easy shot. The textbooks usually serve as no more that an expanded version, sometimes with additional but inessential explanations, of the materials presented by the lecturer. For the second-type subjects, however, textbooks are indispensable, because it is usually not possible to remember every detailed proof made on class (whereas they are usually not included in the handouts), while the textbooks are clear and definitive references for those information not captured.
Unfortunately, such criteria may differ from country to country or even from one institution to another. If you are not sure whether you need a textbook, it is always safer to buy one. Even if you are not able to sell it after the semester, it can always enrich your personal library.