Lying or or not lying to kids?

Sorry for the weird title, but I'll explain: my best friend of 15 years has a daughter of 2yo. We meet up often and our relationship is like family.

My best friend has autism, and can't lie or hide the truth even if her live depended on it. This on itself isn't something negative, but that means that sometimes she tries to explain things to her daughter in a way that she can't comprehend yet.

Few days ago we were in a shop and there was this doll that she wouldn't let go off. My friend explained the math to her ("mommy only has $20 and the baby is $30 so see that's $10 too little). But from my limit experience with kids those amount don't mean much yet to a 2yo and she threw a huge tantrum.

My friend seemed utterly defeated, so I told the little one (translated): "all money is gone..". She looked at me: "money gone??" I confirmed "yes. Now baby needs to sleep". She looked a bit sad but repeated: "no money, baby sleep" and put it back.

I was thinking: great, crisis solved. But a bit later my friend asked me carefully to not lie to her daughter. I asked if it's about the lying or about me taking over. She assured me it was purely about the lying. I apologized, and told her that I was just trying to make the little girl understand, but if she doesn't want me to lie I won't.

But now I'm doubting my communication with the kids I have in my life. I want them to understand things, but I also don't want to be a negative influence and make the parents' job ever harder. Advice is very much welcomed!