The friend of a student who died after taking ecstasy as she celebrated finishing university has been told she could receive a custodial sentence for supplying controlled drugs.

Joana Burns, 22, who was studying maths at Sheffield Hallam University, died after taking £7 worth of the drug, also known as MDMA, an inquest into her death heard this year.

Her friend Katherine Lavin, 21, appeared at Sheffield crown court on Tuesday after admitting supplying MDMA and possessing cannabis before magistrates at a previous hearing. She appeared alongside another former student, Benjamin Williams, 25, who also admitted supplying MDMA, at the hearing on Tuesday.

The judge, Jeremy Richardson QC, said he could not sentence the pair as he required a pre-sentence report. Lavin, from Stockport, and Williams, from Sheffield, will be sentenced on 12 October.

Granting bail to the pair, the judge said: “These are serious matters. All sentencing options remain open and that includes being sent to prison. Please read nothing into into the fact that pre-sentence reports are required and please read nothing into the fact you are being given bail.”

In May, an inquest heard how Burns was with a group of friends who all agreed to take the drug during a night out. Lavin, one of the group, bought the ecstasy, which they each made into “bombs”, Sheffield coroners court was told.

Burns’s boyfriend, Lewis Birch, told the hearing how she had taken the ecstasy willingly and he thought it was probably the third time she had done so.

Birch said the group went to the Tuesday Club at Sheffield University students’ union and Burns took a bomb before she went into the building on 6 June last year.

The court heard that after she took another in the early hours of the morning she vomited immediately afterwards. She then had a fit and was taken to the hospital.

Birch said he paid £14 for two quarters of ecstasy. He told the coroner that everyone else who had taken the drug in the group was unharmed.

The pathologist, Kim Suvarna, told the inquest the MDMA probably reacted with enzymes in Burns’s body and caused it to overheat. “There’s no such thing as a safe drug, particularly with this kind of psychoactive substance,” Suvarna said.

The assistant coroner, Abigail Combes, recorded a verdict of misadventure.

Burns’s mother, Mosca Burns, said in May taking ecstasy was “not worth the risk”.