Yes, you can withdraw from any class, but only prior to taking a final, without getting a "W." Here is an excerpt from UCLA Extension catalog:
"Withdrawal Policy - Students must petition to withdraw from courses prior to the last meeting and sitting for the final exam. The status of "W" (withdrawal) does not appear on official transcripts."
I have known students who dropped a class AFTER taking a final without a "W" appearing on their transcript, but that's more rare because you have to provide medical paperwork to prove that you were truly sick during the final's week, death in the family, etc.