Here's a good encapsulation of the debate over the issue: Can the president be indicted or subpoenaed?
(WaPo factchecker). It also includes links to relevant documents and precedents, but not the Starr Memorandum
that reaches the opposite conclusion. The important point of the Starr Memorandum is that indictment
of, and even trial of the President, is not the same as imprisoning
the President (which I think would be prohibited absent removal by Impeachment or 25th Amendment action).
None of these analyses, however, seem to consider the import of the 25th Amendment to the Constitution, which provides an "expedited" process for removal of the President, by
transmit[ting] to the President pro tempore of the Senate and the Speaker of the House of Representatives their written declaration that the President is unable to discharge the powers and duties of his office[.]
the President were indicted (as I think the Constitution allows), the 25th Amendment would provide for at least temporary
removal of the President to prevent further malfeasance after indictment. That would also be consistent with the gravamen of both the 25th Amendment and the OLC memo. The 25th Amendment does not specify what constitutes "[inability] to discharge the powers and duties of his office". Perhaps needing to defend a criminal case would constitute such disability?