Yes, you can appeal it, because the order dismissing a case is considered a final order rather than an inter locutory order, because the dismissal ends the case.
If you are in the midst of ongoing proceedings and your motion was denied, not at this point. You've already got one judge assigned to the case and at this point the case is 'ongoing' and another...