Yes, it is.
The Spy takes damage similar to a Pyro when he is hit with the knife out, but does not catch fire nor does he take damage from afterburn.
Since the effect lasts for 2 seconds, only the most dedicated spychecking Pyro will be able to even know there was a Spy to begin with.
This commentary demonstrates the power of this thing and sums it up nicely.
There's also a quiet "whoosh" when the icicle melts if you flame a disguised spy, which clues you in that you should keep burning. I can't imagine I'd ever hear it if I didn't use headphones though.