Yes. Floating depends on density comparison:
Examples: A boat floats because its hull displaces water heavier than the boat's total weight. A rock sinks—its density exceeds water's. Temperature and salinity alter water density: cold water is denser; saltwater denser than freshwater (hence easier floating in the ocean).