Always liked my Cameron divot tool, but wished a ball marker was attached to it.
I used some 220 grit sand paper wrapped around a round pencil, to slightly enlarge the end hole in the tool.
A 30mm X 10mm thick rare earth magnet was then glued into the enlarged hole with CA glue.
The magnet has a countersink hole in it, which doesn't really matter for this application.
I'm using a Canadian dime as a marker, but any round (not stainless) steel disc will due.