Carrots contain 3g of sucrose per medium to large carrot. The effect is releasing sugar into the dish to balance the acidity. Many Chefs add sugar to balance tomato acidity in sauce. I use a very small diced carrot. By the time the sauce is cooked the carrots have dissolved.
Potatoes will absorb some of the acidity. They also take up some of the saltiness of a dish. If I make a recipe with too much acidity I think more in terms of what adjustments I need to make next time.
In either case, you are not going to affect the acidity to a great degree. If you want to calm down the acidity a little then this may work. If the acidity is over the top, then no. Many of my younger cooks have heard me say, “Toss it and start over.”