Is there a device into which I could plug a line from the telephone socket in the wall, and then a second port that I can connect to my desk phone?
Then, using software, I could place calls, see caller ID etc from my computer?
Yes, there is, a PCI fax modem.

or for laptops, a USB fax modem

Then any good old "Caller ID" software will do what you're looking for.