Hiya.
Generally speaking, no. The rock isn't magic...it's still juts a rock. The rock isn't "enchanted" at all, it simply has a spell on it.
That said, some DM's do allow items with spell effects on them to be considered "magic". So definitely check with your DM.
My take: As light is a simple cantrip in 5e, I'd definitely rule that is isn't sufficiently 'magic' enough to qualify. I may allow a level 1 and 2 spell to count as "silver" or "iron" if the spell was appropriate (some kind of enhanced light spell for silver, or maybe an earth-type spell for iron). Level 3 or higher may count as magic on a case by case basis. I'd be inclined to let a spellcaster figure out some kind of alchemical "enhancement" that, when combined with a certain spell or spells, on a particular item, with a ritual performed in some specific way, give that item a temporary "only a [item], enhanced by the [ritual] of [somename] can so pierce the shell of the Beast of the Moor's".
^_^
Paul L. Ming