Continuity mistake: Abe's girlfriend dies in the middle of this episode, but at the end, seconds before the end credits, you can see her walk behind some other old people.
Continuity mistake: In the scene where Lionel Hutz hands over the $106 check, Abe Simpson's room number is 18. After Abe called Homer, the manager of the Retirement Castle comes in. The number 18 has now disappeared.
Answer: I'm not sure if this is the one you're thinking of, but an episode of "Ray Bradbury Theatre," called "A Sound of Thunder," dealt with a similar matter: a group of hunters travel back in time to hunt dinosaurs, only to find things have changed when they get back because someone stepped on a butterfly.
Xofer