If ばかり could mean approximately; about; and could also mean only; merely; nothing but;, then how should we know if this sentence ５０００円ばかりもっている。 means:
1) I have about 5000 yen.
or 2) I have only 5000 yen.
ばかり after an amount or a quantity means 'approximately', 'about':
５０００円ばかりもっている。→ I have about 5,000 yen.
僕はここ３年ばかりあの人に会わない。→ I haven't seen him for about three years.
The sense of 'only', 'just' works after a verb:
列車はたった今ついたばかりです。→ The train has just arrived here.
or a noun/pronoun (not indicating a quantity):
あの人は勉強 ばかりしていて... → All he does is study
Note that ばかりに, ばかりか etc. also exist and work differently.
As @Scott just pointed out, in your example, you would use だけ or しか (+negative) to mean "only".