Whether Apple's M1 CPU chip is compatible with Ubuntu depends on the version of the Linux kernel that is used in Ubuntu. In addition to CPU support the Apple M1 GPU is still not supported at all, so running Ubuntu Desktop 21.10 as a dual boot on Apple M1 silicon would be impractical.
The new 5.13 kernel that will be installed by default in Ubuntu 21.10 and later adds support for several chips based on the ARM architecture, including the Apple M1. This means that users will be able to run Linux natively on the new M1 MacBook Air, MacBook Pro, Mac mini, and 24-inch iMac.
Ubuntu 21.10 is currently in its beta development version and is scheduled to be released in October, 2021.
UTM
UTM is an emulation and virtualization solution that can be installed on an M1 Mac from the Apple App Store. This allows a macOS user to either run native ARM VMs or execute Intel x86 virtual machines by using emulation.
UTM uses QEMU as a back-end similar to what the Virtual Machine Manager app does in Ubuntu. Install homebrew package manager and then install the qemu package. You also need to have Xcode installed on your system. In my experience if you try to install homebrew it will prompt you to install whatever Xcode packages that homebrew needs, and once homebrew is installed any additional package dependencies that qemu needs will be automatically installed by installing the qemu package. Installing qemu this way prevents you from installing Xcode packages that you don't need. QEMU is a great virtualization program that I use for all my virtual machines in Ubuntu, but the QEMU documentation is sparse so you have to dig in the forums for information that is missing from the documentation in order to install Ubuntu with QEMU for the first time.
It is also possible to install ROS directly in macOS using homebrew, however according to http://wiki.ros.org "OS X / macOS is not officially supported by ROS and the installation might fail".