Syria has admitted it has chemical weapons and in what might have been a veiled threat against Israel, said it will use them if attacked.