The ruling could clear the way for Trump to argue prosecutors relied on evidence protected by presidential immunity.