Potential challenger to UK premier confirmed as Labour candidate in by-election