Do you have to plant an apple tree next to another apple tree?

No, apple trees do not need a companion tree. An apple tree will flourish all by itself.

Most varieties of apple require a pollinator in the vicinity. Only a small number are self fertile.