Is it okay to say "I can play the piano by music notes" (meaning that if you gave me a sheet of paper with some music notes on it, I would have no problem reproducing that piece of music by looking at that sheet of paper and simultaneously playing the piano) or there is a better way of expressing this thought?
Instead of saying "I can play the piano by music notes", it would be more understandable to say:
I can play piano by reading sheet music
This means that, given a piece of sheet music, you can play the piece. If you can not only read sheet music, but you can play a piece you have never seen before on the first try, you can say:
I can play the piano by sight-reading.
I can sightread on the piano
As Wikipedia explains, sight-reading is:
the reading and performing of a piece of written music, specifically when the performer has not seen it before
The term I am most familiar with is sightread.
to read (as a foreign language) or perform (music) without previous preparation or study
Then you could say that you can "sightread for/on the piano".
Also some people may prefer to use a hyphen in the term, sight-read.
A typical way of saying this is "I read sheet music."
If you'd like to retain the structure of the popular expression "to play by ear," I would use "to play by score".