Is it wrong to use a laptop with the lid closed?
If your hardware manufacturer offers a dock peripheral for your laptop, you can rest assured it's considered normal use for your device. If you're still concerned about overheating, I would recommend using an open source temperature monitoring utility to put your mind at ease.
It really depends on the hardware. Some laptops are designed in such a way that cooling is in some way dependent on the lid being open. Some of the super thin gaming laptops with NVIDIA GPU's are like this, the bottom is cantilevered so that it opens up when you open the lid, exposing or enlarging the exhaust vents to allow for proper cooling. Some other designs integrate the exhaust vents into the hinge in such a way that there can be little to no airflow if the lid is closed (usually such designs have the hot air flowing up in front of the screen).
Other than cases like those though, you should be perfectly fine running your laptop with the lid closed all the time.
There is, however, one other caveat to this: don't put anything particularly heavy on top of your laptop when doing this. Most should be fine, but some have poorly designed lids and may end up with damaged screens from doing that (I had this issue with a couple of ThinkPad L series laptops a few years ago).
If the cooling subsystem of the laptop is functioning as designed, there's no problem. I've seen many folks in many places running with the hood down, and a similar number running without the battery.
Why did I say "functioning as designed"? Well, if the fan fails, the firmware settings altered to slow it down or turn it off, or if vents are clogged by dust, dirt, or hair, that could cause a problem. Solution: Keep it clean and don't override the defaults for cooling.