No, a transaction does not need to be confirmed before another one can be created that spends from it. There is no consensus or network rule that prevents you from spending from an unconfirmed output. However, most wallet software will prevent you from doing so as it can potentially lead to a loss of funds. But just because wallet software limits it does not mean that it cannot be done.
Well thank you. I always used to think that it was built in. Didn't know it was just the wallets preventing from creating a transaction when there was an unconfirmed one.
So if it turns out to be a double spend, then the whole transaction would disappear i suppose ?