Edinburgh were made to pay a heavy price for the mistake, capitalising on the extra man to seize control of the tie with two tries in the space of five minutes.
Vincent Inigo and Steve Malonga both crossed while McKenzie was off, leaving Edinburgh too much ground to make up despite Simon Webster's late try.
Moffat said: "The yellow card was absolutely crucial. We gave away a number of penalties which we can't afford to do but they scored both their tries when we were down to 14 men.
"Castres have a big pack, especially in the back row and I thought Chris Masoe was the main man for them. He really stood out with because he's so strong as a ball-carrier and is a real nuisance at the breakdown but I thought we defended very well.
"The biggest disappointment was that our lineout just didn't function and when you don't get your set-piece right, then it's going to be very difficult. That shows how the rest of our play was to be in with a shout at the end. If we had more first-phase possession then we would have won.
"We always knew it would be tough here as Castres have not lost at home this season so we did well to go so close. It was anther one that got away.
"We should be able to sort out our discipline as well as the set-piece this week and hopefully get a win next weekend."
The defeat has all-but-ended Edinburgh hopes of progressing to the quarter-finals of the Heineken Cup but with Northampton and Cardiff failing to take any bonus points from their tie at Franklin's Gardens, a place in the last eight of the Amlin Challenge Cup as pool runners-up is not beyond their reach.
Moffat said: "We could have quite easily won all three games but instead we've ended up losing them all. That's obviously very disappointing because they were all there for the taking, including this one.
"We have to take the remaining games one at a time but there no point talking about how we could have won the first three games. The only way to rectify that is by winning the next three. That won't be easy as we have to go to Northampton but we have two home games so we have to go for it."
There was one success story from the night, the return of Webster from a long-term Achilles problem that has blighted his last 12 months. The replacement wing stepped off the bench and crashed over to score to set up a thrilling climax.
Moffat said: "It was great just to see Simon back in the squad and then back on the field. Hopefully he can now get a run of games under his belt because he showed what he can do with his try."