Straight from the DMG Errata:
Attunement (p. 136)
The first paragraph ends with a new sentence: “If the prerequisite is to be a spellcaster, a creature qualifies if it can cast at least one spell using its traits or features, not using a magic item or the like.”
emphasis added
Therefore, for the purpose of attunement:
If a creature is able to cast a spell by virtue of their own ability (not from an item), whether that be race, class, or feature, youthey are a spellcaster.