It means you are welcome to try it. It's sometimes said with a little bit of sarcasm, as if to say "I don't know why you would want to do that, but if you do, go ahead."
You can also say it graciously - "Could I borrow this book?" "Yes, of course - be my guest."