The Rakshasa interacts with innate spells as normal
Innate spells are normal spells, so if the spell is of 6th level or lower, the Rakshasa can't be affected or detected unless it wants to be. It also has advantage on saving throws against the spell.
The spells level is listed in the spell description, or is explicitly stated
For example, Drow Mages have the following innate spells:
Innate Spellcasting. The drow’s innate spellcasting ability is Charisma (spell save DC 12). It can innately cast the following spells, requiring no material components:
At will: dancing lights
1/day each: darkness, faerie fire, levitate (self only)
View the individual spell descriptions for each spell to see their levels.
The same is true for PCs
For example, Tiefling's Infernal Legacy states:
You know the thaumaturgy cantrip. When you reach 3rd level, you can cast the hellish rebuke spell as a 2nd-level spell once with this trait and regain the ability to do so when you finish a long rest. When you reach 5th level, you can cast the darkness spell once with this trait and regain the ability to do so when you finish a long rest.
- In this case you can cast thaumaturgy, which is a cantrip (level 0).
- Hellish Rebuke is level 2.
- You can cast Darkness, which is level 2.