Yes, you can trek solo in Nepal without a guide or a porter on many routes. If you come well prepared with a map or traveling a well-trodden path, you can trek pleasantly in solitude.
However, some restricted trails like Manaslu Circuit Trek do require a guide by compulsion. But there are risks of traveling without a guide mostly related to health issues and freak weather conditions.