Twilight Sparkle is not immune to the law, according to both Twilight Sparkle and the law itself. However, when the Equestrian legal system is far too close to Skyrim's for comfort, other ponies seem to disagree.
Crossover: Skyrim. (If you haven't played Skyrim, you may not fully appreciate this fanfiction.)