Application of the Heisenberg model with cubic anisotropy to phase transitions on surfaces