Gifting an App from the App Store
Two things to overcome. First is you need to navigate to the app and to the right of where it says open - choose the box with the up arrow and underneath the pop up, the gift option arises. Second, only paid apps can be gifted.

You will have to enter an email address as an AppleID for the gift to be sent and I have never entered an AppleID that didn’t exist. If you can get the student to make their AppleID first, that might be required and I would recommend it if you know the sale duration allows this time.
I wouldn’t make an account for someone else and strongly recommend against it in general - that seems to end up badly for most people for many reasons. Here are other sale opportunities you might also consider while waiting for your student to get their account ready to receive your gift:

Apple offers discounts when you pre-pay a balance - sometimes 10%
Apple gift cards often are sold at a discount and can be gifted physically and via code