If you try to buy free kindle books long enough you will accidentally purchase a book that is no longer free, or at a price you are unwilling to pay. The best way to prevent this is to refresh the page just before you purchase it to make sure you have to most recent purchase price.
If you do happen to buy a book that you thought was free, you can return the book within 7 days very easily.
First, you need to make sure you pay attention to your email receipts from Amazon. This is the best way to catch a book that was not free. In the past Amazon has sent you a receipt for every individual book that you purchased. Recently, Amazon has been grouping books together so you get only one receipt a day. This is much easier to look through and make sure you kindle book was actually free (or the price that you intended to pay.)