Yes you can appeal. There are two kinds of contempt sanctions. Criminal contempt is punishment for past conduct. The available sentence varies by state and country. In my state, the max is 28 days. Civil contempt is coercive, not punitive. If one continues to defy an order of a court, the court can imprison or sanction the person indefinitely, until they comply. In that case, it is said that the contemnor holds the key to the prison cell.