Magnetic anisotropy in surface-supported single-ion lanthanide complexes