Can students enroll themselves in an assignment?

Yes, students can enroll themselves. You can enable the self-enrollment option for tests, surveys, and training courses. That makes them available to a group of users or all users in the system.
For more information, please check this video.