As you say, that would only work with unlimited material goods for which no invoice is ever due.
This is what makes Babylon 5 so much superior to ST: TNG. B5 dealt explicitly with all of these subjects. Just because it's hundreds of years in our future doesn't mean these problems are going to go away.
To my knowledge, the Star Trek universe hasn’t really gone into great depth with regard to how money is handled. Picard gives a general idea in First Contact, but it could be just setting the mood for when Alfre Woodard’s character calls him out on his so-called “enlightened sensibilities” at the end of the movie.
Also, just because there is no “money”, doesn’t necessarily mean there isn’t some other method of exchange. In the TV series the Ferengi used latinum as a valuable commodity for exchange and it’s safe to assume that Federation crewmembers vacationing on Risa or some exotic locale which isn’t a member of the Federation may require some type of currency.
In the first episode of TNG (Encounter at Farpoint) you see crewmembers shopping for fabric but there isn’t a mention of how that exchange is carried out.
I think in the original series “credits” were used as a currency. Trader Cyrano Jones quotes prices in credits in The Trouble with Tribbles. Of course, in that episode, the Tribbles blew up the supply/demand curve.