Can I let a tracking marker paint a mask? I want to do some retouching an a video shot and it would help to be able to use a marker to "paint" a mask.

By paint I mean how you paint with the grease pencil. But instead of your mouse cursor you use a tracking marker to paint.

Is there any way to do something like this?

EDIT: In my shot the actor pretends to spray paint a wall that is already finished (We forgot to shoot an important shot at the beginning). Now I tracked the sprayer and want it to "paint" the color on the wall.

But I can imagine other use cases for a functionality like this.
You will probably need to do it with dynamic paint, as Charles recommended, and it is possible without solving a camera motion:

You can easily set it up by tracking the wall where he is painting with a simple 4 point track, so you get 5 markers. Then, link empties to those markers, hook a plane's vertices to the wall markers and parent a cube or other object to the "painting" marker, so you can get a canvas (plane) that deforms with the footage without solving or reconstructing geometry.

Set the dynamic paint to output an image sequence of the object painting's on the plane, and then use that image sequence in the compositor as the mask, or alpha, that you need to create the effect that he is painting it.