The question is more or less in the title - what is the oldest scripture to reference the term atma? I know some of the Upanishads expound on the concept; are there even earlier references?
The earliest reference of Atma can be found in Rigveda. The Rigvedic verse 10.97.11 says,
यदिमा वाजयन्नहमोषधीर्हस्त आदधे ।
आत्मा यक्ष्मस्य नश्यति पुरा जीवगृभो यथा ॥११॥
When, bringing back the vanished strength, I hold these herbs within my hand, The spirit of disease departs ere he can seize upon the life.
Yasakacharya who is considered as great Etymologist, has given the etymology for this Rigvedic verse in his work "Nirukta" verse Nir III. 15 :
आत्माऽततेर्वा आप्तेर्वा । अपि वाप्त इव स्यात् । यावद् व्याप्तिभूत इति ।
Nir III. 15 The word åtman is derived from the root ata meaning constant motion or the root apa standing for permeation. Thus permeation is accepted as the very nature of åtman.
According to Wikipedia
The earliest use of the word "Ātman" in Indian texts is found in the Rig Veda (RV X.97.11). Yāska, the ancient Indian grammarian, commenting on this Rigvedic verse, accepts the following meanings of Ātman: the pervading principle, the organism in which other elements are united and the ultimate sentient principle.
Other hymns of Rig Veda where the word Ātman appears include I.115.1, VII.87.2, VII.101.6, VIII.3.24, IX.2.10, IX.6.8, and X.168.4.
Quoting couple of verses from RigVeda mentioned above:
RV X.97.11 yadimā vājayannahamoṣadhīrhasta ādadhe ।
ātmā yakṣmasya naśyati purā jīvagṛbho yathā॥11॥
RV I.115.1 citraṃ devānāmudagādanīkaṃ cakṣurmitrasya varuṇasyāgneḥ ।
āprā dyāvāpṛthivī antarikṣaṃ sūrya ātmā jagatastasthuṣaśca॥1॥
RV VII.87.2 ātmā te vāto raja ā navīnotpaśurna bhūrṇiryavase sasavān ।
antarmahī bṛhatī rodasīme viśvā te dhāma varuṇa priyāṇi॥2॥