It might be possible, but it could get expensive. I converted a hardtail bike to what I call a pseudo-road bike. I kept the mtn rims but put on 1.25 slicks, changed the cassette and cranks, drop bars with bar-con shifters and road brake levers. Also changed the fork to a mtn fork with no suspension. This is really just a project bike for me and it helped me to learn how to do my own wrenching.
The question is why do you want to do it? If you just want to go a bit faster on the road, slicks will help a lot and won’t break the bank doing so. Then you can start to change the cassette for better gearing. This is the least amount you can do and keep the cost down a little.
But if it is to save money, you would be better off buying even an entry level road bike. You should take an inventory of all that you want to change, and then see how many parts you have in your spare parts box. Then add up the cost to buy the rest of the parts. Don't forget the unobvious like new cables and housing. Also if you have linear pull brakes, they won’t work with road levers unless you get a travel agent too. Cantilever brakes are okay though.
The other issue would be how the bike fits you once you convert it. You could be too stretched out with the road bars on. The hoods could be several inches further out on the road bars. Then you may need a really short stem to get it back toward you.