I use the "Logitech TrackMan Marble" trackball with Linux and X11. I use a custom configuration, so I can scroll with the trackball when the left small mouse button is pressed.
If you want to use this configuration too, create the file `/usr/share/X11/xorg.conf.d/50-marblemouse.conf` with this content:
Section "InputClass" Identifier "Marble Mouse" MatchProduct "Logitech USB Trackball" Driver "libinput" Option "ScrollMethod" "button" Option "ScrollButton" "8" EndSection
There is a German language wiki page for configuring this trackball, which helped me a lot: