Obedience to God can sometimes make you unclean and it is never a sin to obey God. Here are three examples:

1) Burying a relative
2) Sex
3) Childbirth

None of these things are a sin under normal circumstances--in fact, sometimes they are commanded--yet they can still make a person ritually unclean, according to the Bible. It's not necessarily a sin to become ritually unclean, but it can be if you are able to do something about it and you don't.

And of course, it's important to remember that ritual uncleanness has little to no impact on anyone's life today, since there is no Temple or altar.