Yes you can but you need to make a static class and access the static class inside the controller.
You can just put it in a class like below.
public static class Utilities
{
public static string ReturnSomething()
{
// code here
}
}
Then you can call it from any of your controllers, no matter what their base class is.
public ActionResult index()
{
string test = Utilities.ReturnSomething();
}
Note that you should not generally be accessing your controllers from your view template. The controllers should pass data to the views and it should be a one-way flow of information from controllers to views.