The appointment is set against a tangled argument between the government and the President, Andrzej Duda, over who controls the National Prosecutor’s Office.