The consensus among Catholic and Protestant commentators is that the midwives did not sin by disobeying Pharaoh, but if they did lie to him, they sinned.
Handling each point separately:
Disobedience to Pharaoh
Catholic commentator George Leo Haydock cites Acts 4 and Matthew 10:28 in reference to Pharaoh's command to kill the male Hebrew children, indicating that civil disobedience is appropriate in this instance.
John Calvin strongly defends the midwives on this point, saying that obeying Pharaoh here would have been "an inexcusable contempt of God." Methodist commentator Adam Clarke writes that the women rightly obeyed God's command from Genesis 9:6 rather than Pharaoh's.
Lying to Pharaoh
The idea that the midwives lied to Pharaoh in verse 19 is contested by Clarke. He writes:
I contend that there was neither lie direct nor even prevarication in the case. The midwives boldly state to Pharaoh a fact, (had it not been so, he had a thousand means of ascertaining the truth), and they state it in such a way as to bring conviction to his mind on the subject of his oppressive cruelty on the one hand, and the mercy of Jehovah on the other.
Thus, according to Clarke, God rewards the midwives in verses 20-21 for both their obedience to God and their frankness toward Pharaoh, and since they did not lie, they did not sin.
However, Haydock sees the matter differently. Citing Augustine's Contra Mendacium, he argues:
Perhaps [...] the midwives spoke truth, with regard to the generality of the Hebrew women. But they gave way to a lie of excuse, with regard to some, (ver. 17,) which St. Augustine would not allow, even to save all the Hebrew children.
Thus, according to Haydock, the women sinned:
The midwives were rewarded, not for their lie, which was a venial sin; but for their fear of God.
Augustine likewise says the women are guilty of lying, and that they received their reward for being "merciful to God's people." To those who say that the midwives would have died if they had told the truth, Augustine answers:
Yea, but see what follows. They would die with an heavenly habitation for their incomparably more ample reward than those houses which they made them on earth could be: they would die, to be in eternal felicity, after enduring of death for most innocent truth.
Calvin similarly sees that the women "escaped by falsehood":
[B]oth points must be admitted, that the two women lied, and, since lying is displeasing to God, that they sinned.
To explain God's reward to them in spite of their sin, Calvin continues:
[I]n [God's] paternal indulgence of his children he still values their good works, as if they were pure, notwithstanding they may be defiled by some mixture of impurity.