An electoral court in Mexico ruled Thursday that the attorney general’s office illegally used public funds to interfere in the country’s July 1 presidential campaign after the office released a surveillance video of opposition candidate Ricardo Anaya.