The detect magic spell states (emphasis mine):
you sense the presence of magic within 30 feet of you. If you sense magic in this way, you can use your action to see a faint aura around any visible creature or object in the area that bears magic
And the definition of a cantrip in the PH is (emphasis mine):
A cantrip i s a spell that can be cast at will […]. Repeated practice has fixed the spell in the caster’s mind and infused the caster with the magic needed to produce the effect over and over.
Is a visible creature that knows and can cast at least one cantrip detected as "bearing magic" by the spell detect magic?