@JohnRennie Finding the force due to the ring (and then using newton's third law) and considering the sphere as a point mass helps
But then, directly finding the force on the ring due to the sphere which can be treated as a point mass doesn't help. (without using Newton's third law. )
If we consider an element of the ring subtending an angle $d\theta$ then its mass is $md\theta/2\pi$, so the force is $dF = \frac{GM md\theta}{4a^2 2\pi}$
If we go back to the side view, there will be a component of the force that acts horizontally inwards towards the centre of the ring. When we integrate this component will sum to zero.