Maxperson
Morkus from Orkus
Well, you CAN throw it. It would be silly to think otherwise. If you can lift it, you can throw it. The part about it being in improvised weapon makes sense, but is not RAW.The rapier doesn't have the "thrown" property, which means you can't throw it. You can throw a long pointy piece of metal that you have in your hand, but if you do that it is no longer a rapier. It is an improvised thrown weapon, the same as a rock. Improvised thrown weapons do not have the belong to the ranged group or have the finesse property so you can't sneak attack with them.
RAW says that improvised weapons rules come into play when you don't have your weapons. "Sometimes characters don't have their weapons and have to attack with whatever is at hand."
A rapier is his weapon, so the improvised weapons rules don't apply unless the DM rules that they do. If we go by your interpretation of the rules, having the finesse property means that if you throw the rapier, it would get sneak attack.
Now, in my game I wouldn't allow it, either, but by the rules as written, it wouldn't become an improvised weapon.