'You can get this book free' is technically more correct. 'Free' is an adverb here, so it doesn't require a preposition to connect it to anything.
However, the expression 'for free' is very common. It has developed, I would guess, by analogy with such sentences as ''You can get this book for 5 euros' or ''You can get this book for nothing'.
Both forms are acceptable, and there is no difference in meaning.