It is possible to replace DVD drive & add a 2.5" SATA SSD. But desktops use 3.5" ones, i guess, so you basically can't use a laptop SSD in a desktop without some modifications
there are no 3.5 inch SSDs.. all normal SSDs are 2.5 inch or M.sata/M2.sata or PCI Express which are very expensive..
Its completely possible to use a laptop SSD in a desktop, almost all cabinets have 2.5 inch drive bays (only the cheapest crap like zebronics do not)
2.5 inch drives use the exact same ports (1 sata port and 1 sata power port) as the 3.5 in drives.. so connecting wont be an issue at all..
However, modern SSDs are typically Sata 3 based, using them on a SATA 2 port is possible but it will never reach the full speed the SSD can perform
@OP
What you should check is if your laptop has SATA 2 or SATA 3 slot.. If it's SATA 2 slot, adding in a SSD will give massive amounts of diminishing returns, your port will bottleneck the transfer speed of your SSD