Historically disadvantaged Karoo residents have a right to access land their ancestors first occupied more than 200 years ago, appeal court ruled.