Same brand, different battery
Ryobi also sells Ryobi 40V and Ryobi 80V HP. We have no source saying their packs fit Ryobi 18V ONE+ tools, so don't assume a shared brand means a shared battery.
The Ryobi 18V ONE+ lineup
Ryobi 18V ONE+ is Ryobi's cordless battery platform. PowerToolGrid lists 53 products in it: 11 batteries, 4 lawn mowers, 8 string trimmers, 5 leaf blowers and more. Prices on file run from $44.97 to $349.00. Sold only at The Home Depot.