As previously answered, if the length is long relative to the rise time of the signal, then yes, you should treat the trace as a transmission line. A complication is that the trace will probably NOT be a 50 ohm transmission line.
I don't have the formulas for determining the impedance of a trace at my fingertips, but they are googleable. Trace width, spacing from ground plane(s), and the material of the PCB all come into play.
As for how to deal with it, assuming that 1) the trace is long enough that you have to deal with it, and 2) you know the trace impedance, there are two cases:
Case 1: trace impedance higher than 50 ohms. For this example, I'll assume the trace is 150 ohms. Terminate the trace with its own characteristic impedance, in this case a 150 ohm resistor. So now the trace is good. Moving back to the connector, you have a 150 ohm trace and you want 50 ohms. So you need to add a resistor in parallel with the trace (from connector to ground) to make the total impedance be 50 ohms. Standard parallel resistor math applies here: 1/(1/50-1/150)=75, so you need a 75 ohm resistor.
Case 2: trace impedance lower than 50 ohms. For example, suppose the trace impedance is 30 ohms. Terminate it with a 30 ohm resistor. At the connector, you have 30 ohms and you want 50, so you need to add a 20 ohm resistor in SERIES with the trace.
In both cases, both the cable and the trace will be properly terminated.