All of it is definitely doable but it might be tricky to explain here on a forum. At a high level you would use the widget infrastructure to grab and move spheres around but you also want to compute the depth map without the spheres at release time so you could use it for the positioning of your sphere on the surface you care about.
I let @Forrest expend on that if he wants.