If I have a part that has pins that are 1.2mm long. Can I use a PCB that is 1.2mm thick or does it need to be even thinner than that?
If you'll use this part in a mass production (i.e. at least tens of production each day) then the PCB really should be thinner than the pin length for easy soldering. As Enrico has stated in his answer, you should follow the manufacturer recommendations for PCB thickness.
But if you are talking about using this part in just a few PCBs (e.g. up to 5 PCBs for testing purposes) then you may use a 1.2mm or even 1.6mm PCB having through-hole plating. However, lots of manual soldering and using some chemicals like flux, solder paste, etc will be required. And care must be taken as it'll nearly impossible to verify if the pins are properly soldered.
This actually works quite ok, as long as you solder it using the pin-in-paste method. For example, in Littelfuse's appnote, they use 1.4 mm long pins with 1.55 mm PCB.
Make a solder stencil opening for each of the holes. When you apply solder paste, it will go into the holes and on the pad around it. When heated to reflow temperature, it will flow to the hole and form a good connection.
However, reliable pin-in-paste soldering in mass production requires careful dimensioning, and most of the cheapest PCBA manufacturers do not even offer it. It might also be that the connector layout is too dense to be able to fulfill the required pad size specification.
Visual inspection requires a visible solder fillet. This needs the pin to protrude beyond the surface of the board, so the solder meniscus between the end of the pin and the pad on the board can be seen.
It may be possible with skill and hand soldering to use a pin that's flush with the board, or even buried within the hole. However, it's not inspectable, and so highly not recommended.
You should be able to find a USB socket with pins of a suitable length.