Yorkshire councils issue warning over law change affecting upcoming elections