Is there a way, in the Mac App Store, to buy an app and to give the license to a friend who has no way to pay for that app?
No, Apple didn't implement the gift feature in the Mac App Store. I imagine it will happen eventually, but it isn't there right now.
Your only option would be to buy your friend an iTunes gift card, which can be used to buy apps.
I have not seen the option to gift apps in the Mac App Store like you are able to do for apps on iOS devices and in iTunes. However a workaround you could use would be to get your friend an iTunes gift card to cover the cost of the app. The Mac App Store uses the same accounts you would use to purchase content from iTunes or the AppStore on an iOS device.
If your friend does not have a credit card to set up an account, it is possible to set up an account without a credit card. To set up an account without a credit card. All you have to do is attempt to download a free application from the Mac App Store (this works in iTunes and on iOS devices as well), when prompted to sign in, click on the button that says "Create an AppleID". This will take you to a page to enter your email and choose a password, security question, etc.. After filling in that information, the next page is the where you enter your payment info. The section where you choose your Payment Type will have an option for none (This "None" option will not appear unless you attempt to download a free application and then create your AppleID). On that page you can also redeem the gift cards, promos etc. Hope this works for your friend
If you love them a lot, you can log into your account from their computer, download the app, and then after the app has installed, log out of your account by going to the Store < Sign out.
It worked for giving my little sister FaceTime. :)