Lavinia Woodward, 24, attacked the man at Christ Church college, while she was under the influence of drink and drugs.
She admitted inflicting grievous body harm, the Oxford Mail reported.
At Oxford Crown Court, Judge Ian Pringle QC said he believed the attack was "a complete one-off".
More on this and other stories from across the South of England
"To prevent this extraordinary, able young lady from following her long-held desire to enter the profession she wishes to, would be a sentence which would be too severe," he said.
"What you did will never, I know, leave you, but it was pretty awful, and normally it would attract a custodial sentence."
Medical student Woodward met the Cambridge University student on dating app Tinder, the court heard.
During the attack at the college, she thumped him, lunged at him with a bread knife, and stabbed him in the leg.
She also threw a laptop, glass, and jam jar at him before stabbing herself, the court heard.
Judge Pringle was told Woodward had become addicted to drugs and had previously been in an abusive relationship with a previous boyfriend.
He said he would take an "exceptional" course of action and defer sentencing until September.
Defence barrister James Sturman QC had argued it would be "almost impossible" for Woodward to become a surgeon once she had disclosed her conviction to employers.
The judge ordered Woodward to remain drug-free, and told her she would be sentenced on 25 September.
Francis FitzGibbon, the chair of the Criminal Bar Association, told the BBC's Today programme the case was "unusual".
"The judge must take into account determination or demonstration of steps to address addiction, so it sounds as though he's giving her a chance and I think the judge would do that for anyone wherever they came from in the right circumstances.
"I don't know if her future prospects are the critical factor in this.
"Maybe if she does really badly [on her drug rehabilitation] he'll think again."
Get news from the BBC in your inbox, each weekday morning
An "extraordinary" Oxford University student who stabbed her ex-boyfriend in the leg may avoid jail as it would affect her career prospects, a judge has said.