Suppose that you have a projection obtained by mapping spherical coordinates to a texture; example:
What is that projection called?
Is it possible to "fix" such texture so that it becomes a regular perspective projection?
That specific projection is called an equirectangular projection.
Your second question is much harder to answer. The short answer is "no" there isn't a "simple" way to fix this projection to a perspective projection. You can easily map it to a cube, but that's just due to how it's defined (you can find out more about this with a quick google search). As for a more difficult answer, if you need to create a perspective image from one of these projections, you'll have to do some more advanced edge and line detection. I found paper that talks about some methods, but it's still quite tricky.
Face and Straight Line Detection in Equirectangular Images
Edit:
After a bit more research, I found that you can make a perspective projection by projecting each point on the sphere onto a cube that contains the sphere. Paul Bourke has a quick tutorial for photoshop which can probably be converted to pseudocode fairly easily.