can i remove the ir sensor?
I guess so. Will it work afterwards? - Depends on what you expect it to do.
. You can remove it, but what will sink RA4?
Man, this is a vague question, why am I trying to answer it? Maybe you've got something with an IR device and for some unknown reason you want to remove it? Cut the "legs" with strong scissors, or use a soldering-iron. Perhaps you want to build something, but for some unknown reason want to not use an absolutely-essential component? Or maybe you want to do "something like this" but what it is you're not saying? More information please. L