Is there anything I can do if a professor agreed to supervise me but I was rejected by the admission committee?
No PhD program that I am aware of guarantees admission to every candidate who meets the minimum requirements for admission. Moreover, an agreement to supervise you is not a guarantee of admission, either.

Most likely what happened is the usual in such circumstances—there were enough other qualified candidates that the admissions committee did not choose to extend you an offer. I'm afraid that there's not really much you can do here. Writing the professor will be a waste of your time, and filing an appeal isn't likely to get you anywhere, either.