The highest legal adviser to the Court of Justice of the European Union said in a preliminary opinion that any EU country can take legal action against companies such as Facebook over violations of data privacy rules—not just the main regulator in charge of the company.