Yes, they can withdraw you if the unit is compulsory or core - departments have different specifications and criteria on this and it should be explained in detail, in both your notification letter and in your student handbook.
It is unlikely that you can appeal if this is an issue of academic judgement which is procedurally sound. Usually appeals hinge on one of the following issues: evidence of bias or discrimination in the marking; inadequate supervision (usually reserved for dissertation fails and PGR courses); administrative or procedural error. You should speak to your student union about this as a matter of haste. Your academic advisor will not usually be able to advise on this because it is most institutions class it as a conflict of interest.