To find a solution, we look at the following file:
vendor/sonata-project/admin-bundle/src/Resources/views/Form/form_admin_fields.html.twig
We can take a look at money_widget or percent_widget.
We will use the existing class: input-group-addon class.

templates/bundles/SonataAdminBundle/Form/form_admin_fields.html.twig

{% extends '@!SonataAdmin/Form/form_admin_fields.html.twig' %}

{% block text_widget %}
    {% if attr.prefix is defined or attr.suffix is defined %}
        <div class="input-group">
            {% if attr.prefix is defined %}
                <span class="input-group-addon" style="width: 1%;">{{ attr.prefix }}</span>
            {% endif %}

            {{ block('form_widget_simple') }}

            {% if attr.suffix is defined %}
                <span class="input-group-addon" style="width: 1%;">{{ attr.suffix }}</span>
            {% endif %}
        </div>
    {% else %}
        {{ block('form_widget_simple') }}
    {% endif %}
{% endblock %}

src/Admin/BookAdmin.php

    protected function configureFormFields(FormMapper $form): void
    {
        $form
            ->add('urlAlias', null, [
                'label' => 'book.field.url_alias',
                'attr' => [
                    'prefix' => 'prefix',
                    'suffix' => 'suffix',
                ],
            ])

The final result: