Read 12V input with Arduino/Teensy via PC817 (Optocoupler)
Assuming a 3 pin rocker switch with a common anode/+12v pin, a switch +, and a led ground pin, the only concern is that it already has a built in resistor for its target voltage. So adding another resistor and led will reduce the brightness on both leds if you don't factor that in.
Assuming a 20mA 3.4V led is inside the a nominal resistor of 430 ohms is being used. Add a 1.4V led like the opto listed in your schematic and the overall current drops from 20 to 16 mA. Basically a non issue. At that 2.2k resistor and you are down to 2.6 mA. The switch led and the opto won't be very bright.
But thats only assuming you have a 12V DC supply and not a 220V AC supply. We need your full wiring information.
Update
Based on your new schematic, you are not putting the led in series with the opto. While this technically does not show you if the led is on, it does tell you when the switch is on, conducting 12V through to the switched output. For all intensive purposes you can assume the led is on. It will work without changes.