One of the great aspects of mediation is that you can structure it however you want. If the parties want to allow attorneys into mediation, they can. If they prefer to keep attorneys out, they can do that too.
Attorneys can be helpful in mediation, because they can offer the expertise and experience to imagine probabilistic outcomes, and help you find points of leverage, and avoid pitfalls.
On the other hand, attorneys can sometimes be aggressive enough to turn back progress on negotiations. Or, an attorney might be less incentivized than the parties to arrive at a mutually acceptable agreement.
It’s always a good idea to consult an independent attorney prior to participating in mediation. And it’s always a good idea to have a mediated agreement reviewed by a lawyer before signing.