Yes. Knowing that you are dreaming for a split second is still a lucid dream.