Weak geodesics on prox-regular subsets of Riemannian manifolds