Yes, but there are times when the train is closed during the fireworks (you'll know that it is because Small World is roped off). If that's the case (or even if it's not), you're best bet would be to immediately go towards the main area of Fantasyland, wait for the fire marshall to clear the area (cuz they won't let you in until he does), then take Big Thunder Trail to Frontierland. Taking Big Thunder Trail will be a lot faster than the train in any case.