Remember, he was willing to hand Michonne over to the Governor, knowing that was a death sentence, only to protect his own interests. At least Carol was dealing with a genuine threat to the entire prison community (if allowed to turn / get loose), as opposed to Rick, who tried to place a non-threat's head on the chopping block.
While I agree that Rick has been somewhat hypocritical and caring largely about just his group's interests, I don't agree with the above.
He seriously questioned the handing over of Michonne, enough so that he ended up discussing it with others to try and dissuade himself from doing it. There was a lot of internal moral conflict that we saw there, and we don't get that from Carol until after she killed Karen and David. She was a little bit more impulsive where Rick gave things a lot more thought. Both methods have their drawbacks, and the two aren't strictly impulsive or reserved.
I disagree that either of them has any kind of moral high ground or that Carol's interests extend much further beyond her group.