I haven't checked, but in principle, it should work, since the spell is cast according to the usual rules. So, you can go for Sorcery if you want to rely entirely on magic. Although, it might not appear.
It didn't work in 2.1 (I installed it as a mod).
I haven't checked in 3.0 myself, but people said it doesn't work. And the mechanics probably haven't been changed.
By the way, the chance of getting Sorcery for a Ranger is 8%. It's more likely that Magic of Light won't appear, which has a 4% chance.
Yes, to avoid pointless arguments like "But in the Wheel of Fortune...", I'm saying that there's an error in the Wheel of Fortune. The information is taken from the game's resources.
Горящие реки сходили с ума, пытаясь остаться водой,
Земля пропустила коварный удар, раскрывшись на шаге вперёд,
Взлетел разъярённым драконом Огонь и понял, что тоже умрёт...