One resistor on two LEDs
Yes, it will work, but I don't recommend it. The above circuit is Ok, as long as only one LED is on, it'll work fine. If both leds are on, that's alright, they won't get damaged, but their behaviour are unsure; depending on their characteristics, probably they will glow with a different brightness, but thats all.

But I still highly suggest that you use separate resistors for each led, because that's the right way to do it. It's never a good design to wire diodes in parallel.