Cosmology and modified gravitational wave propagation from binary black hole population models