It depends on the degree of disability.
I'm a private pilot and years ago was doing theoretical evidence to enter the FAB.
After the second test, I had an accident with my car, breaking the windshield with my face and cut the cornea of the right eye.
After the operation, the aircraft went to the clinic to do another test. Result: could continue as a private pilot, but not for the FAB. Could reach 80% with the glasses, but the Fab requires more than 100%. So you may consider being a private pilot.
It depends on which type of pilot you want to be. To be a civilian pilot, there is some tolerance for defects of vision. Hyperopia is a much smaller obstacle than myopia. To be a military pilot, the tolerance is zero.
Of course you can. As long as you are not legally blind and your vision can be corrected with glasses or contacts, then you can become a pilot. That is to say, your vision can be corrected to 20/20 with glasses or contacts, then you are probably ok to become a pilot.