If a spellcaster’s racial trait grants a spell that requires material components, can they use their class’ focus to cast that spell?

Based on the answer to this question about non-spellcasters, spells granted by racial traits don’t waive the need for material components. However, can spellcasters use their class’ allowed focuses with such spells, or must they still acquire the specific materials (or a component pouch) to cast them?

If the spell is also on their class’ spell list, does that change anything?