The spell is already chosen
The user of a cracked orange prism Ioun stone doesn't get to choose. When you ask if it has to be from “your class list”, it sounds like you're thinking that a character who finds the stone gets to choose, but that is not the case:
Wearer adds one cantrip or orison (determined when the stone is created) to his list of spells known or spells prepared.
Like a wand or a scroll, a cracked orange prism already has the cantrip or orison it grants set when it is created. Just like when finding a wand you actually find a wand of fireballs or wand of cure light wounds, when you find a cracked orange prism Ioun stone you are actually finding one for a specific spell, such as a cracked orange prism Ioun stone of prestidigitation or a cracked orange prism Ioun stone of know direction.
There doesn't appear to be a class-based condition on adding the cantrip or orison to your list of spells known/prepared — the magic item itself just adds it, regardless, and specific beats general. So yes, you would get it regardless. For example, a druid using a cracked orange prism Ioun stone of prestidigitation would have prestidigitation as one of their orison choices.