Could be wrong but i don't think the EU can grant citizenship or residency rights and that's up to member states to decide.
As far as i remember, the EU never told the UK when it was a member what rules to have about 3rd country immigrants, although there might have been the odd restriction.