What your friend means is "under duress." This phrase means that you are doing something, but not willingly, and because of certain pressures upon you.
If you are arrested, and held for two days without food and water, and hung upside down from the ceiling, and offered food, water, and a warm bed to rest in if you sign a confession, that confession would have been given "under duress" and if the facts could be proven, could not be used against you. More practically, if your car is towed from a space where it may or may not have been parked illegally, and you believe it was legally parked, and improperly towed, and the towing company will not release the car to you until you have paid the towing (and possible storage) fees, you may decide to pay the fees and get your car back, then sue for the return of the fees, contending that they were illegally charged, and paid only under duress. State law will determine whether your payment is the final end of the issue, or whether you are still entitled to contest the fees you paid "under duress."
I think your friend is mistaken when he says that you can get out of a traffic ticket that you pay "under duress." You have a right to contest the ticket and have a hearing before an appropriate judge or hearing officer. Or, you can pay the ticket, which is essentially an admission of guilt. Or, in some places, you can plead guilty "with an explanation," and submit the explanation, and hope that the fee will be waived or reduced. In some cases, you can plead guilty and pay the fine, then later file a Motion to set aside the guilty plea and have a trial, providing a sufficient explanation as to why you should be permitted to do so. This might or might not be successful, but if it is, it would only restore your right to have the same trial you had a right to in the first place.
I am unaware of anywhere that you can create a technicality such as your friend suggests, pay the ticket, then somehow get the conviction for the traffic offense vacated and the fine returned to you on the basis of putting "under duress" on the ticket or in some submission sent in with the ticket.