If each subject of consciousness is one with the transcendent, then none is a separate self. Therefore, Atman-Brahman entails its apparent opposite, anatta.
The Upanishadic rishis and the Buddha inherited the concept of Atman.
The rishis affirmed Atman whereas the Buddha negated it.
However, the rishis' affirmation of the oneness of Atman negates its separateness and thus agrees with the Buddha.