It's a bait and Bernèz has fallen for it because he sees it as an avenue of making riches to marry his sweetheart. The beggar is indeed a vile man and is only interested in getting the treasures for himself alone.
But Bernèz is a Christian and I think that he would escape that trap somehow and return home with the treasures at last.
Getting a doctor's appointment should be easy peasy since it's something that has to do with someone's health and general well-being. At least you've got the dentist' appointment which is still in order.