Is there a way to paint text onto a texture in Blender?
Blender's painting tools are limited to simple brushes and textures. The easiest way would be to open the image in an image editor and add text to it.

You could open an image with text on it and use it as a stencil texture to paint it onto your mesh.

For a hacky workaround you could add a text object, convert to mesh, use a boolean modifier to cut it out of a plane, then position it in front of your object and join it to your mesh and paint through the hole. Then you can select the disconnected mesh and delete it.