Hi @nanditabiswas
Yes you can.
Here's an SSD/memory [https://www.crucial.com/compatible-upgrade-for/acer/aspire-5742#memory|supplier] page for your model that is useful.
It shows how much memory and what type is compatible with the laptop. Also the same for an SSD.
You don't have to use this supplier. Just use the information on the page to find SSD/memory suppliers that suit you best.
Here's the ifixit [guide|116576] that will help you to replace it with an SSD.
Here's a [https://www.youtube.com/watch?v=CDKKBjlvSO8|video] that shows how to replace both the HDD and the memory.