I have found two different sites with 2 different answers. The first claims that the "Titanic" had the first shipboard swimming pool.
"The first over-the-top luxury ship set off on its maiden voyage on April 10, 1912 with new features like a shipboard swimming pool, a la carte dining, a Parisian café, and a Turkish bath." The pool was 30 ft. long X 14 ft. wide and 7 ft. deep and filled with a combination of heated sea water from tanks and cold sea water.
https://www.aol.com/2010/03/05/cruise-ship-firsts-through-history
https://en.wikipedia.org/wiki/First_class_facilities_of_the_RMS_Titanic
The second states that the "Adriatic" had a swimming pool in 1907.
"1907: The White star line installs a swimming pool on its ocean liner, The Adriatic."
https://www.aol.com/2010/03/05/cruise-ship-firsts-through-history?
"Adriatic was the first ocean liner to have an indoor swimming pool and a Turkish bath.[1]"
https://en.wikipedia.org/wiki/RMS_Adriatic_(1906)
Both of these ships were owned by the "White Star Line." The maiden voyage of the Adriatic took place on May 9, 1907, from Liverpool to New York. The captain was Edward Smith. He was also the captain of the ill-fated Titanic, going down with the ship in 1912.
The Adriatic sailed from New York to Liverpool on May 2, 1912. Aboard were some of the surviving passengers of the Titanic.