Alice developed a technology and the development of the tech was funded by her ex-advisor. No user study has been done yet and there is no publication in the picture. Only the tech has been developed so far, which is entirely Alice's code. Recently Alice changed her advisor. Ex-advisor is not allowing Alice to use the tech as part of her dissertation. What do you suggest Alice should do here? Do you think the ex-advisor has the right to stop Alice from using the tech despite Alice developing it entirely on her own?
It doesn't matter if a grant was for a specific thing, if Alice was paid on that grant then she did not develop anything entirely on her own, she developed something with support from the grant. Even if Alice wrote all the actual code, if the previous advisor gave guidance and direction in any way they may have some partial claim on the product. Who specifically owns the work depends entirely on the terms of that grant/Alice's employment, and possibly also the laws that pertain to Alice and her institution: it might be Alice, it might be shared between Alice and her ex-advisor, it might be the university, it might be the government/granting agency.
However, the issue of "not allowing Alice to use the tech as part of her dissertation" seems to entirely be a department/graduate program issue. Primarily, I would recommend Alice see what the advice of her current/new supervisor is on this issue. Is this work necessary for Alice to graduate? Is her other work sufficient without it? What is the position of other people who decide whether Alice graduates, like members of a thesis committee? It may be necessary to escalate things to department/graduate school leadership to put pressure or make a decision, but hopefully even before it gets there some agreement can be arranged between Alice and her advisors.
It's pretty important to know what the ex-advisor's motivations are; some of those motivations, like some sort of revenge, are clearly unethical. Other motivations may be more reasonable - if disclosure of this technology in a dissertation will imperil a patent, for example, it may be in both the advisor and Alice's best interests to move forward with patent protection in mind. It's not clear from the question whether that's the case.