Dropbox allows a user to drop a file into a shared folder without having this user to be part of the shared folder. This feature is called file request.
Does Google Drive have a similar feature?
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.Sign up to join this community
Google Drive doesn't have a feature like "file request" of DropBox.
The closest built-in feature is to transferring the file ownership but this will not add the file to a folder.
By using Google Apps Script or Google Drive API you could achieve a similar behaviour. You can see an example of a script that would do that here.
Google Classroom works together with Google Drive to manage files. On class creation, a Google Drive folder is created on behalf of the class owner and it's shared with the teacher assistants and with the students.
Teachers could create assignments then the students could submit files adding them as attachments to the assigment. On the assignment submission the ownership of the files is changed so only the teachers could modify the files. Teachers are able to return the files to the students, but in this case (using an assignment as a "file request") this step could be omitted.
To learn more about the assigment flow in Google Classroom see Understanding the assignment flow - Google Classroom Help