Officially, no. There are endpoints for specific things (Assign alterer is one of the coolest, since it allows you to add arbitrary FIR at this position, and it gets resolved after).
By AST I'm assuming you mean FIR. If you want to manipulate the actual AST, you could probably write a pre-processor or something that uses the compiler to parse code into AST, modifies it, and turns it back into kotlin source files, then passes those on to the compiler. You'd have no IDE support though.
For FIR, there are some unofficial tricks though. For instance, status transformer gives you access to a declaration. As a result, you can just edit the declaration's body right there. The body won't be resolved, obviously. You can combine some of these extensions, though. For instance, status transformer can insert dummy
someSpecialNameHere = someCode
assignments at arbitrary points in a declaration's body, and then assign alterer can come in and replace those assignments with arbitrary FIR (and with the initial part of the body now resolved).
FirFunctionCallRefinementExtension
can also be (ab)used to let you edit the arguments to function calls, and it can be especially helpful to add assignments inside lambdas so that you can add arbitrary FIR.
I have some examples
here and
here. Do note that they're hacky though, and thus there's no guarantee they'll continue working.