Ahmed is a third year student at the Doon PG College of Agriculture Science and Technology in Uttarakhand's Dehradun.
In a video clip that was widely shared on social media, he was seen in all-black, holding a grenade and shouting slogans at the funeral.
"A few days back, video clips of an unidentified terrorist wearing a battle pouch with a grenade were in circulation on social media. These video clips were clicked in Tral area by local media persons during the funeral of self-style terrorist commander Sabzar Bhat," a police spokesperson said.
Bhat, the successor to Hizbul commander Burhan Wani who was killed last year, was shot dead in a massive anti-terror operation on May 27.
According to the police, Ahmed has revealed that he was in touch with terrorists of south Kashmir on social media and was instigated by them.
The police reportedly contacted his family after the video surfaced.
He was arrested last year for stone-throwing but let off. "He was picked up by the police but was let off after counselling in view of his career," said the police spokesperson.
"His parents were convinced that if he surrenders, he would be dealt with fairly under law. Efforts made by security forces yielded results and Danish surrendered before police and 21 Rashtriya Rifles of army in Handwara," he added.
Ahmed, say the police, was tasked by Hizbul Mujahideen commanders to galvanise young men in north Kashmir but he "realized the futility of joining militant ranks".
Ahmed has reportedly told the police that terrorists in south Kashmir are mainly involved in extortion and looting. He also confirmed that money is freely flowing from Pakistan for funding of terror in Jammu and Kashmir.
The police say his case is being considered for the state's Surrendered Militants Rehabilitation Policy.