As you originally guessed, you cannot receive the mastery tokens in ARAM.
I believe that the intention of mastery is to show that you've earned the mastery through regular gameplay (read: Summoner's Rift). For this reason, you can't earn a mastery token anywhere outside of Summoner's Rift PvP.
However, I will say this: I think the whole mastery system for levels 6 and 7 is somewhat flawed. I like the idea that mastery beyond 5 can only be earned on the Rift, but the implementation is a little sketchy. Right now, mastery 6 & 7 doesn't necessarily imply you have mastered the champion. You could simply enjoy playing the champion and had a few lucky games where you pulled out the appropriate grade.
With the recent 'stats' feature I think they could fix this by giving masteries beyond 7 for players who have strong performances on the rift while allowing players to receive mastery tokens (for 6 & 7) on any map.
TLDR: I think they want tokens to only be earned through regular gameplay on the Rift. Mastery doesn't necessarily show that you are decent at the champion, though, so the system sort of makes sense but at the same time it doesn't!