Control of other outlets from a switched outlet

Hi, I am new to ZWave and though I have searched many forums I cannot find an answer to the following. In a room with a switched outlet (let’s call it “A”) connected to a standard switch (call it “S”) and an always-on outlet (call it “B”), is there some way to have lamps connected to both A and B turn on when through switch S? In a non-ZWave world, the old solution was to run an extension cord from outlet A to the lamp connected to B, so both lamps would run off the same outlet (i.e., outlet A). Basically, I want ZWave to replace the extension cord. From my reading, the only options are to replace both outlets and the switch with ZWave items, which would allow me to turn my lights on/off by cell phone from anywhere in the world, but that is overkill; I just want to replace an extension cord. Thanks!

Assuming “S” is a zwave switch and “B” is a zwave outlet, then you could set up a rule so that if “s” is on, then turn on “B”

There might be a fraction of lag, but it should be minimal.