Amir Hosseini, 27, of Lancaster Road, Pilling, near Blackpool, was arrested after an incident in Bilsborrow, near Preston, on January 3 this year, Preston’s Sessions House Court was told.
He also admitted possession of cannabis in Garstang on the same date.
At the time he was subject to a suspended sentence order made in July 2018 for supplying a class B drug.
Recorder Paul Taylor imposed four months in prison, suspended for a year, with a four month tagged curfew.
Hosseini was also fined £50 for breaching his suspended jail term.
Knife crime accounts for around 1% of all crimes in the county, according to Lancashire Police. Home Office funding was recently secured to tackle the issue.