Is it OK to add another author during page proofs? I am a masters student and recently I got a paper of mine published in a journal. 
The paper contains my name and another authors name that helped me with some minor things. I didn't know that this paper was going to be published but after it did I told my professor about it and he said that the paper  could be part of my thesis. The problem is that for that to happen the paper has to only include my name and my professors name. After telling the second author about this he said that he doesn't mind if his name is replaced with my professor's. Can I ask the journal to do this during page proofs or is it too late?
This would be up to you, your colleague, the professor and the editorial rules of the journal - if you decide to go down that path, read up on the rules or ask the editorial team.

However, @polfosol makes a very important point in his comment, that to do this would potentially be unethical, primarily due to your co-author contributed directly towards the paper, your professor did not (I assume based on your question).  A major consideration is that this publication also adds to your current co-author's research profile, not just yours.

A possible solution to this is to write another paper, building on and citing the research in this published paper.  

Another possible solution is for your professor to contribute to reviewing the proofs and having him added as another co-author - once again, if you decide on this, then you must check to see if it is alright with the journal (but this may also be stretching ethics a bit).