Your approach of deriving from MNIST and applying the rotation in the __getitem__ method seems to be valid.
You could store the angle values in a list and apply the corresponding angle in __getitem__.
This would make sure that a particular sample for an index gets the same rotation using the index.