My solution isn't exactly like you're trying to do, but close. In the survey distribution tools > participant list, you can upload the email address and participant identifier of your choosing for all of the group of students you're trying to survey. You would have to check with your local admins what the limit is on how many total can be in the list and how many at one time can be invited. To get exactly what you're looking for I'm thinking it would be doable with the API. If you're sending that invite where they put their email and student ID in to everyone, you might as well skip that step and just invite your whole group. If you're putting a flyer out or just sending it to a student listserv/newsletter, you'll need the API. If you're going that route, your issue is mainly a programming one with very little happening on the REDCap side. My best guess how it would work is:
1) student fills out form
2) API is pinged every X minutes to check for new records. [you could do this manually, but that may affect engagement if they have to wait too long to receive the link].
3) Run a program that compares the two identifiers to your database to look for a match.
4) After comparing to your database, trigger the API to fill a REDCap variable Yes/No if it matches.
5) Set up a REDCap trigger that sends the survey if the match variable = Yes.
6) Optional, send a notification if there is not a match either to the student or to you to double check it.
Jump into the API sandbox and start trying things out. There's lots of good starter code out there to get going.