Lots of games have this, I'm sure. Not that I can remember any/all of them. As bler144 said, it'd be a very long list, even though guns don't usually make much sense in fantasy settings (i.e., the manufacturing industry isn't quite up to the task, unless the guns are very primiitive).
A few that have yet to be mentioned (unless I missed them):
Seems to be standard for fantasy tactics games for some reason.. Just to name one: Fell Seal: Arbiter's Mark. Yeah, guns are restricted to a particular character class, but each character also has a secondary class, which could be a pure spellcaster.
Jade Empire, although there's only one gun (I think).
Legend of Heroes: Trails in the SKy/Trails of Cold Steel series, although not the "main" player character Likewise for Hyperdimension Neptunia.
Lots of console games I can think of, but I won't mention them, other than the Wild Arms series, which is mostly about gun wielders, but still in a fantasy world with magic.