The phenomenon you're describing is called parallax. I've heard the technique called either "Parallax Removal" or the "X-Ray Brush."
Taking 2 or more pictures of an object in one plane by moving the camera in a second, parallel plane. Objects not on the target plane will "move" relative to the target plane as a result.
You can do layer them into a "clean" image manually by lining up the layers and erasing the top layer to reveal the underlying layer without the offending object.
I generally leverage Smart Objects in Photoshop for this. You'll need to take at least 3 images, being careful to keep your camera and subject on their own planes, then line them up and convert the layers into a smart object. Then select
Layer > Smart Objects > Stack Mode > Median to automatically select the average pixel, and because you have two pixels of the desired object, and one of the offending object, you'll get the desired pixel every time.
This doesn't work well with things that aren't stationary (leaves, water, etc).