You'd better not go to swim which will have the possibility to make your eyes with corneal ulcer get worse. If you really want to swim, you could wear the swimming goggles which will protect your eyes from the contamination of the polluted water. You should better have the good rest to make your eyes feel comfortable and cure the corneal ulcer.
No, you can't.
It will definitely worsen your corneal ulcer. You may have known that corneal ulcer is an open sore on your cornea caused by scratches or inflamation. You have ulcer on your cornea which is extremely vulnerable to bacteria, virus and fungas.
Swimming pools are really dirty with all those bacteria, virus, fungas, urine, dirt or other unknown filthy stuffs.
If you really want to swim, you had better wear a pair of goggles. But it's best for you not to swim until your ulcer is cured.
The answer is no! The mainly cause of corneal ulcer is bacteria. And swimming pool is like a big pool filled with bacteria. So if you continue to go to swim, your eyes will get worse. So I recommend you treat your eyes as soon as possible and listen to the doctor's advices. So that sooner or later you can go to swim.