A magic weapon that possesses both the brilliant energy and ghost touch magic weapon special abilities ignores nonliving matter yet affects incorporeal creatures normally. Further, according to this Paizo blog post, a weapon that possesses the quality trip—like a halberd or whip—can also be used to perform the combat maneuver drag.
In combination, a creature using, for example, a +1 brilliant energy ghost touch whip can take a standard action to make a combat maneuver check that provokes attacks of opportunity against the square that the creature thinks her foe occupies. She makes a normal combat maneuver check against the foe's combat maneuver defense to drag her foe except that, because of the foe's total concealment, the drag maneuver has a 50% miss chance. If she's successful, she'll pull that incorporeal creature out of its space within the object to the adjacent space where the incorporeal creature can be dealt with normally.
Note, however, that a +1 brilliant energy ghost touch whip—despite costing 72,301 gp—is useless against incorporeal constructs and undead. You'll need a different tactic for ghostbusting or Vision-wrangling.
Of course—because Pathfinder—, casters can do this better: a similar weapon can be conjured with the 2nd-level spell ghost whip.
Note: I look forward to other answers. This is an already complicated problem made worse by the incorporeal creature having total concealment provided by the object! Also, thank you, ShadowKras, for suggesting the ghost whip spell.