Yes, it was ok. The only times you can't clean your ball, are when you are identifying it, checking to see if it is damaged, lifting it because it might interfere or assist another (and it lies off the green), or to see if you get relief from something like an embedded lie and then you don't.