Yes! You can drop out of school after being selected for the H1b visa. It is recommended to finish the semester with grades reported on the transcript until the H1b takes effect.
You can contact your university's academic advisor if you need to drop out immediately.