You can teach your dog in an unfenced yard with some basic boundary training. You can train your dog about his boundaries and the restrictions he needs to follow in this training. However, this training takes time and needs to be taught repetitively.