Indices of holomorphic vector fields relative to invariant curves on surfaces