There are a few things between your current code and something that works:

the autograd engine actually sees when none of the inputs require a gradient and decides that the entire gradient business can thus be skipped, you could add a dummy argument to avoid that,
torch.autograd.Function.forward you are implicitly in a torch.no_grad context. You need to use with torch.enable_grad(): to re-enable gradient tracking.
you didn’t have any gradient requirement in your function, without that, the exercise seems futile (probably you’d want to check and raise an exception or not run backward or something).
but you want to detach the Function.forward return value to prevent bad things to happen™,
I will admit that I have reservations about using .backward in autograd.Functions, but this is just a feeling and I don’t have an alternative.

So with these ideas we might produce the following and it runs and puts a gradient into a.grad.
import torch

class Functional(torch.autograd.Function):
    @staticmethod
    def forward(ctx, f, dummy):
        with torch.enable_grad():
            value = f(2)**2 - f(1)
            ctx.save_for_backward(value)
        return value.detach()
    @staticmethod
    def backward(ctx, grad_output):
        value, = ctx.saved_tensors
        value.backward(grad_output)
        return None, None

class Function(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.a = torch.tensor(0., requires_grad=True)
    def forward(self, x):
        return self.a * x

dummy = torch.empty((), requires_grad=True)
function = Function()
functional = lambda f: Functional.apply(f, dummy)

value = functional(function)
value.backward() 

The more important question, of course, is why you would want an autograd.Function if you don’t need the gradients of any inputs. The same result could be obtained if you just used a plain Python function instead of torch.autograd.Functions and without all the complications:
def functional(f):
  return f(2)**2 - f(1)

would be a more correct, concise and less indirect way to do things.
(lambda: print("Best regards"))()
Thomas