It's possible to see both, but you may not get great seats for Fantasmic. A lot of people do leave after the fireworks, so it's always less crowded at the second showing of Fantasmic.
We often watch the fireworks from the back of the castle in Fantasyland. It's less crowded there, especially if you stand in the back near where Dumbo and Casey Jr. are. If you can find a place that's not obstructed by trees, you'll have a pretty good view of the fireworks and the castle.
If you stand in front of the castle in the central hub area, it's going to be extremely hard to move in any direction after the fireworks are over, and it will be near impossible to get to Frontierland via New Orleans Square and Adventureland. That pathway is an absolute nightmare near Fantasmic showtimes and should be avoided at all costs.
I've found the best way to get to Frontierland is from that Big Thunder Mtn. RR pass that connects Fantasyland to Frontierland. It's at the back of Fantasyland, near Casey Jr. If you're already standing there to see the fireworks, you should be able to slip right through. It'll just wind around Big Thunder and you'll come out on the back side of the Rivers of America. From there, you can just make your way as close to the front as you can.
If you only have one night to see Fantasmic, I would suggest passing on the fireworks and getting to the Rivers of America earlier to ensure good seats. The fireworks are okay, but if I had to choose, I would rather see Fantasmic.
Good luck!