Of course you can. If you sell today you have legally done so. Settlement is just the payment date for fund transfer.