Enemy Crab that I have not sensor locked. On its turn it used sensor lock, revealing itself. Note the +5 Enemy Effects modifier, 4 of that is from ECM, and I believe 1 is from the pilot (I forgot to check how high Arclight's Piloting ability was).
Firing at an enemy Commando that I had sensor locked. It was still inside the enemy ECM bubble, but does not have the +4 Enemy Effects modifier. Sensor lock removes all benefits of ECM.
Another shot at that Commando on the next turn. See that is inside the ECM bubble and does have the +4 Enemy Effects modifier since I have not sensor locked it. That Locust next to the Commando is mine, which reduced the enemy stealth, but does not remove the missile defense.
I forgot to include LRMs in my test lance, so I could not test indirect fire, but I am certain that I would not be able to use IDF on revealed enemies that were still in the ECM bubble unless they had been sensor locked.