This one is going to be pretty hard to fight. Just about every argument you could make in your defence, the Prosecutor will have an answer for. If you dove across the bullnose (solid white line) to re-enter traffic, particularly after speeding up to get in front of the other driver, it will be difficult to win if it goes to trial. If you made a lane change and the lines were still broken, you might be okay, and able to argue that you safely made the lane change and did not cut anyone off. The problem is that the officer and the Prosecutor are likely going to say that you were trying to pass, instead of accidentally entering an off-ramp and then trying to stay on the highway. It would be a bit of a crapshoot with the JP if it went to trial... because here are some arguments you might've tried versus what the Prosecutor would argue:
You: "I realized it was an off-ramp, and had to stay on the highway."
Prosecutor: "You should have taken the ramp and then re-entered the highway. The highway would still be there."
You: "I had to speed up to pass the guy."
Prosecutor: "You should have slowed down and got in behind him, or just got off the highway and back on."
You: "I didn't know it was an off ramp until the last second."
Prosecutor: "You should have been paying closer attention to the road."
Plea-bargaining might be in your best interest in this case... something like "disobey sign" or "unauthorized use of the shoulder." But, file for disclosure and see how it goes.