Can a professor force you to buy a book, for use in his exam?
As user2768 already pointed out in a comment, the question is not whether the prof can force you (no, they can not), but if it is reasonable / fair to require a specific book for an exam. 

The answer can depend on many factors:


Is the professor the author of the book? If yes, I would see an issue because this would boost their personal income. This does not seem to be the case in your situation.
Can the exam be completed without the book? E.g. in technical fields, it might be helpful to have a formulary, in languages a dictionary, etc. In most cases, it it just reasonable to use such a book because otherwise you would have to memorize too many facts / formulas, etc. 
Is the book a pre-requisite for doing the exam? I did not study law, but from my understanding, one of the natures of law is to derive conclusions based on written text (especially laws). Therefore, it is impossible to do the exam without access to the original law text. So in your specific case, I would say the professor has to require the book, otherwise it would be impossible to do a proper exam. 
Is the price / effort unseasonably high? In your case the short answer is "no". In fact it is extremely cheap. 
Are there reasonable alternatives to a printed book? Electronic versions of the text would provide an unfair advantage over students using he paper version since they are searchable, in addition it is difficult to guarantee the sanity of the device. One solution might be to provide each student with a computer holding a local copy of the law text and having the internet connection disabled during the exam. The university would need a tremendous infrastructure for that. 


To make a long story short: Buy the book. And don't throw it away after one year ;-). Maybe you can hand it over to a student next year. 

One additional idea: If you are having some sort of students association: Ask them to organize a bookshelf for such kind of literature.