The UK will have to hold elections to the European Parliament as a condition of any further delay to Brexit.