Yes, but Not Likely. Parasites can be contracted into your penis while swimming, generally while urinating in the water. A common one is shistosomiasis or snail fever. Most of these are found in tropical areas. There are a lot more parasites and bacteria that could infect you through other sites, oral, open wounds, etc. But, specifically through the penis is not as common and usually associated with urination.
Very unlikely. Bacteria might enter the first millimeter or two of urethral maetus and cause irritation or urethritis. But only if ur swimming in contaminated water with a bacterial count too high to permit bathing. Schistosomiasis occurs in africa, asia & s. America in lakes and rivers with contaminated water. Parasites enter body through the skin.