The Echo Knight has the following ability:
When a creature that you can see within 5 feet of your echo moves at least 5 feet away from it, you can use your reaction to make an opportunity attack against that creature as if you were in the echo’s space.
The Warcaster feat has the following benefit (emphasis mine):
When a hostile creature’s movement provokes an opportunity attack from you, you can use your reaction to cast a spell at the creature, rather than making an opportunity attack.
If an Echo Knight has the War Caster feat and knows a cantrip like, say, Booming Blade, can they use the cantrip for opportunity attacks made from the position of the Echo?