Regular disposable diapers absorb water and swell up in the water, so you cannot use them in the pool. Instead, you can purchase disposable or reusable swim diapers.
Swim diapers have a snug-fitting waist and legs to keep solid waste from escaping into the water. However, they have no absorbent layers to contain urine.