The Rams missed a penalty for the third game in a row - they have now failed from their last four spot-kicks - before Edwards burst forward to lift Ipswich six points clear of the relegation zone.
But McCarthy said: "We burgled it. I thought I heard the sirens and I said, 'Shut the doors, the police are coming!'
"Did we deserve the three points? Not on that performance because they were better than us.
"We saved a penalty and had to stick at it because we've not played particularly well, but it was a bit of quality at the end - it was a great strike. He's 34, Carlos. He's stayed on the pitch and run his socks off and then produces that.
"Derby have played well at times and they were the better team, but it won't say in the history books how we've played - it will say we came here and won. We worked hard, we've fought our corner and we got lucky.
"The players have been fabulous. That spirit has been right through the club since I've been here, and without that we'd have been out of the league now. They deserve a huge amount of credit for that."