In a starship economy, money as a means of exchange would be ridiculous - although the sequence of barter trades you mention from DS9 also seems ridiculous to me, because so many of the goods concerned just seem like something you'd just squeeze out of a replicator.
It is the replicator in Star Trek that makes money and exchange for goods ridiculous, not the starships. Starships in and of themselves no more do away with trade than do jet airplanes. A starship economy would likely make central bank money ridiculous or at least highly problematic in all new ways.