It's best for you right now to concentrate on figuring out if it's going to be ophthalmology or EM and save yourself the hassle of dual-applying. If you absolutely can't figure it out in the upcoming 8-10 months, then you should worry about the details of how to apply to both.
For right now, just realize that what happens in the SF Match has no effect on what happens in ERAS and nothing automatically happens to one application because of the other. However, if you match ophthalmology in the SF Match, you are contractually obligated to take that spot, so you must withdraw your EM application from ERAS.
Also, it's ophthalmology. If you're serious about considering it, at least get the spelling right. I've seen enough of your posts to know it isn't a typo.