There actually was, predating gold coins in fact. What people did was carve notches representing quantities into sticks. The sticks were then split down the middle such that they could be lined back up to verify that both came from the original stick and the notches lined up. One of these halves would then often be entrusted to local officials for safekeeping. When people wanted to settle accounts, they could meet up with their half of the stick, light them up and make new cuts.
(Of course this doesn't prove that gold coins were created to facilitate anonymity.)