1. If you drop the doll to the floor, the student near the doll should pick it up.

2. If you drop the doll onto the floor, the student near the doll should pick it up.

3. If the doll drops to the floor, the student near the doll should pick it up.

4. If the doll drops onto the floor, the student near the doll should pick it up.

(Which ones are grammatical? Which preposition do we have to use? Are both OK?)

All the possibilities you have given are good. And yes, either preposition works fine.

=)