The answer to this question is a “yes”. You can become a data scientist if you even belong to any engineering stream other than computer science, but it is not that easy.
Data scientists need to understand engineering problem-solving and design, while mechanical engineers don't necessarily have the same high-level understanding of data science. Mechanical engineers are predominantly interested in solving real-world problems and designing products that solve problems for the market. This may not be as important for a data scientist who is focused on building tools and creating algorithms for other people to use, but it's still something to consider when you're looking for a job.
So, as a mechanical engineer, if you are looking to learn data science to become a data scientist it is advisable to take a course for data science, so that you could learn all the concepts of Data Science before applying for a data scientist role. For your reference, you can check Data science and AI course by Intellipaat. It provides a lot of features along with many benefits to deliver a good learning experience.
You can even view the success story of Tarun, one of Intellipaat’s learner who became a data scientist from mechanical engineer.