You can do what you ask, but you need to understand that the desktop HDD will be used on the laptop (via external enclosure) solely as a data storage device. It can NOT become the boot drive for your laptop.
You should recognize also that any application software already Installed on your desktop machine will NOT appear to be Installed and useful when that HDD is connected to the laptop. Software Installation these days means entering a bunch of key info into Windows' Registry, which is maintained on the Boot Drive of the machine. So as far as your laptop is concerned, software on that new external HDD is NOT "installed" on it, and it does not know completely how to use it. I think there are ways to remedy this, BUT I suspect it may alter the Registry files on the desktop HDD you have mounted in the external enclosure. Before proceeding, check out all the details to make sure you understand all the implications.
However, you most certainly CAN use that HDD in the external enclosure to access, modify and use all data files on it. It's just the application software that is in question. And of course, any app software installed on your laptop is fully usable.
If your plan is to buy an external enclosure and move the desktop's HDD into it for a while, then move it back again, you should have no big trouble. Removing and re-installing a desktop HDD is not really difficult. External enclosures sold for this purpose are designed to make it easy to install and remove the HDD unit you already have.
There are THREE items you need to pay attention to when choosing an external enclosure.
1. Do NOT buy one for "Portable" or "Laptop" external drives. These will accept the smaller form factor drives from laptops, and do not always include a power supply system suitable for desktop HDD's. Buy an enclosure designed for standard 3½" desktop HDD units. It will come with some type of power supply system. You may or may not want to have one with a cooling fan included. The fan systems are more expensive but cool the HDD well. However, many feel they don't need that much cooling.
2. Check what type of connection you will use at the laptop, and make sure your enclosure has this, too. If it is USB2, that's very common. A really new laptop may have USB3, which also is backwards compatible with USB2. Many enclosures come with two or even three interface options built it - mine has both USB2 and eSATA. Also be sure to get the necessary data cable to connect the units.
3. Inside the enclosure, make sure it accepts the type of HDD you already have in your desktop. That is, SATA or IDE. There are really only those 2 choices. And, of course as I said above, it must take the "standard" desktop HDD physical size, 3½" form factor.