On the Selmer group associated to a modular form twisted by a ring class character