Medical students absolutely should NOT be introducing themselves as "doctor". That is almost one of the first things we are taught in our clinical skills course. At my school, we are told to introduce ourselves as a medical student.
Are you sure these are medical students and not residents that are introducing themselves as a doctor? Residents HAVE graduated from medical school and have their MD, so they are in fact doctors. They are getting further training, though, in order to be able to practice alone and learn their specialty practice. So a person may still be learning and not be a medical student.
If these really are students, you should talk to the person introducing themselves as a doctor and see what they say. Otherwise you can talk to their attending/preceptor and tell them your feelings, because you are correct that this is not good practice.