Yes. Here you can find how to write a stored procedure in the CLR: https://learn.microsoft.com/en-us/sql/relational-databases/clr-integration/database-objects/getting-started-with-clr-integration?view=sql-server-ver17&tabs=cs.
To start a command-line process from .NET, you would use the class System.Diagnostics.Process.
You will have to piece the things together yourself. Keep in mind that once you are in the CLR, it is quite possible that you can achieve what you want to do through .NET directly, without spawning a subprocess. As one example, see this blog post from Raul Garcia: https://techcommunity.microsoft.com/blog/sqlserver/using-clr-to-replace-xp-cmdshell-for-specific-tasks/384391.