Updated answer based on discussion with OP (see comments).
First, a disclaimer: I am not a lawyer, so there's a good chance I'll mess something up here.
I'll begin by noting that a special counsel, such as Robert Mueller, is considered an attorney for the government. As such, the rules and regulations of the Department of Justice apply to him just as they would to any other DoJ employee.
Furthermore, as an attorney for the government, a special counsel is "subject to State laws and rules, and local Federal court rules, governing attorneys in each State where such attorney engages in that attorney’s duties...". In other words: the usual rules of practicing law still apply to special counsels (in addition to the DoJ rules, or vice-versa if you so prefer).
Now comes the crux of the matter: what would happen if a special counsel, or any attorney for the government, tried to indict a sitting president? As far as I can tell, that would fall under CFR Chap 28 Section 77.4 . Specifically, under the condition "Inconsistent rules where there is a pending case." (Note: I'm assuming that somehow, this made it through a federal judge. That ain't going to happen, but the OP wants to assume it does.)
As I read it, the "inconsistency" here stems from the fact that there is no settled law, short of the memos from the Office of Legal Counsel cited below, pertaining to such a scenario. The regulations therefore suggest that
...the attorney is encouraged to consult with a supervisor or Professional Responsibility Officer to determine the best course of conduct." (Source)
Beyond that, I think an argument could be made that a special counsel trying to indict a sitting president would violate CFR Chap 5 Section 2635.101 Subpoint B.14:
Employees shall endeavor to avoid any actions creating the appearance that they are violating the law or the ethical standards set forth in this part. Whether particular circumstances create an appearance that the law or these standards have been violated shall be determined from the perspective of a reasonable person with knowledge of the relevant facts.
Given that it's been reasonably-well established (again, see memos below) that the president is immune to any form of criminal indictment, I think trying to do exactly that could be considered a violation of this statute. Violation of this statute (and any of the other ethical guidelines)
... may cause the employee's agency to take disciplinary action, or corrective action...in addition to any penalty prescribed by law. (Source)
Again, though -- I am not an attorney, so this is just a reasonably well-educated citizen's attempt at reading the U.S. Code of Federal Regulations. Make of it what you will.
Original answer follows.
This particular issue was settled in the 1970s (specifically, 1973) during the Watergate scandal. As part of the investigation, the DOJ's Office of Legal Counsel was tasked with determining whether or not the President and/or other federal civil officers could be indicted or criminally prosecuted while in office.
In a memorandum issued in 1973 and reaffirmed in 2000, it was concluded that the President is immune from indictment and criminal prosecution while in office. The rationale is that allowing such an indictment or prosecution "would impermissibly undermine the capacity of the executive branch to perform its constitutionally assigned functions." All other federal civil officers, including the Vice President, do not share this immunity.
Note that the President is only immune while in office; if removed via the impeachment process, they lose this immunity and may then be indicted and prosecuted. However, the 1973 memorandum also addressed this issue, noting that while it may be possible
...to indict a sitting President but defer further proceedings until he is no longer in office ... given the realities of modern politics and mass media, and the delicacy of the political relationships which surround the Presidency both foreign and domestic, there would be a Russian roulette aspect to the course of indicting the President but postponing trial, hoping in the meantime that the power to govern could survive. (Source)
Unfortunately, I was only able to find the text of the 2000 memo; the link is above. If I can find the 1973 memo, I'll add it as well. Link updated!