We haven't yet seen the details of a bounty being collected, but it seems incredibly unlikely that the marines would pay a pirate the bounty for defeating or capturing another pirate, as all pirates are by definition wanted criminals who are to be arrested on recognition, as in the world of One Piece, merely flying a black flag and declaring yourself a pirate is a crime. This seems backed up by when Blackbeard captured Jewellery Bonney and tried to exchange her with the world government, they responded by sending a warship with an angry Akainu on board.
It also seems unlikely that they would give the bounties to marines who are carrying out their duties, and would have different rewards in place, but it is perfectly possible that marines can and do earn bounty rewards.
The main groups that seem eligible to receive bounties seem to be:
- Bounty Hunters
- Armies and soldiers who report to a single nation instead of the world government
Obviously for the average concerned citizen in One Piece, capturing or defeating someone with a large bounty is impossible, as bounties tend to be at least somewhat correlated with strength. A notable exception is a young Nico Robin, who had a large bounty long before she had any significant combat strength, so was always on the run and fearing being turned in.
Anyone not considered a criminal who has the luck/power to capture or kill a bounty holder while not working for the world government seems to be guaranteed the bounty, so almost anyone except for marines, revolutionaries, pirates and other criminals.