If the wire which is supposed to go the brake switch were incorrectly attached to a brake
light line, and if the Ranger has combined stop/turn signals (some big "if"s there...), then hitting that turn signal would turn the brake controller on with every flash. It isn't really the wire to a
light you want, it is one right out of the switch on the pedal.
If this is the
Hoppy Impulse Electronic Trailer Brake Control (Stock No. 37235), then it's just a timer "control", anyway. I would buy a proper proportional controller rather than spending time making this one work - but the new controller will still need the correct connections! Hopkins (Hoppy) doesn't seem to offer any on-line technical guidance for installing or wiring their brake controls, but other major manufacturers (including Cequent/Tekonsha) do.
Since the brake switch is usually easy to find (it's the only switch attached to the brake pedal arm), I found it easy to check each of the connections in my Sienna for the one which turns on only when the pedal is pressed. If there is a
reliable source of this information
specifically for the 2007 Ranger, then sure, follow that. Standard "Ford" colour coding may not apply to any particular model, and is probably based on the F-150. I notice that the
Impulse packaged for installation in a Ford is not wired for a Ranger, or for any recent model.
I think the ignition switch issue is a red herring; brake
lights normally work when the ignition is off, so I don't think that should be a problem for the brake controller.