how to ensure carrot pieces stay longer in the refrigerator?
Sounds like fermentation to me. Without some preservative (salt or acid like vinegar, for example), you're going to pick up some bacteria out of the air and they'll eventually have their way with your food. You can't expect cooked vegetables to last but so long in the refrigerator, especially unpreserved food that you're dipping back into regularly.

I'm curious why you feel the need to cook a week's worth of carrot in one go. As I'm sure you know, blanching doesn't take all that long. Surely you could just cook one or two days' worth at a time, and know that while you'll have to cook your carrot more often, you will also have a lot less risk of having to throw any spoiled carrot out.

That's the solution I'd recommend.