There's no way to tell what kind of magic a spellcaster has, or even if someone is a spellcaster. But! Crafting a setting isn't just throwing some cultures in a pot, it also involves creating the tools of the world. Magic is a tool, so creating a setting also covers creating new spells or forms of magic that the setting demands.
In such a setting as you describe, spellcasters would have long ago developed a dedicated spell or set of spells specifically to solve this problem of identification. Creating this setting demands that you create the spells they use for this. Homebrew a spell (or two) using detect magic as a template, and that's how people tell them apart.
For example, you might create this:
Almar's echoauric discrimination
1st-level divination (ritual)
Casting time: 1 action
Range: Self
Components: V, S, M (a crystal hourglass blessed by a High Priest of Mystra worth at least 100gp)
Duration: Concentration, up to 10 minutes
In 1481 DR a lowly scribe-mage of Mystra produced this revolutionary spell. Casting it reveals the past usage of magic by a creature, using obscure chronomantic principles rediscovered by Almar in her researches.
You can use your action to focus on a creature to reveal the presence or absence of spellcasting use in the creature's past, perceived as an “chrono-echoic aura.” A second action used in the following round reveals the broad type of the creature's previous spellcasting, whether divine, arcane, or both.
Or you might create two spells, one for each type of magic. You might create variations that are available only to divine or arcane spellcasters, depending on the needs of your cultural setup. And given the existence of such a spell, the door is opened to the existence of magic items that grant it continuously, which would make it more practical for use by a wizardly academy's door porter, a well-heeled socialite, a magistrate, and so on, though still likely uncommon.