First off, if you don't have a vacuum pump, go ahead and get one. Like it or not, this isn't the only vacuum problem you're going to have with a 240D.
As for the lock, inside the door there are are several rods that connect everything together - the lock, the knob inside the door, the vacuum component, etc. Since you're able to lock/unlock the door with the key, your vacuum switch is probably okay, and it's most likely something screwy with the rod that goes up into the knob inside the door.
Does the knob move up and down when you lock/unlock the door with the key?
You might want to just take off the door panel and have a look at what's going on in there when you use the lock from outside. You'll probably have to peel back the plastic liner from inside the door to see what's going on - get some spray adhesive to put it back into place.
As an initial guess from what you've described, I'd take a look at the hinges that connect all the rods together, make sure none of them is frozen or gunked up.
For what it's worth, I've got a similar problem with my '83 240D - the passenger's door can't be manually locked or unlocked, either by the key or by the knob; however, it works fine remotely when I lock/unlock the driver's door. Since I virtually never use the passenger's door, I haven't bothered to fix it yet. I just need to adjust the connection between the vacuum switch and the rod, since the problem "mysteriously" started when I replaced that vacuum switch.
P.S. I've got a brief write-up of diagnosis of vacuum problems for door locks and such; if you want copy, send me your e-mail address.