Bear in mind that the sonoff device is powered from the wire that you are switching off, so your first problem would be how to power the sonoff device when the wall switch is off.
On the other hand, sonoff has another device (https://www.itead.cc/sonoff-wifi-wireless-switch.html) that is not meant to be installed inside the lamp; but AFAIK it is just a switch, and you need a 2-way switch to make a typical two-way wiring circuit. So that is a dead alley, too.
Finally, the best solution I can think of is to replace the wall switch with one of their wifi switches (https://www.itead.cc/smart-home/sonoff-touch.html), and wire the lamp so it remains powered on.