If you turned base early, cutting off other traffic, what is the safest way to rejoin downwind?
Interesting, but you're not the first to encounter this situation. I understand from what you say that you were going to wedge in between the no 1 and no 2 traffic already established on final. 
Given the circumstances and not time to think about this, the preferred option would be to turn left to rejoin downwind. Assuming no other traffic in the pattern. Then you are turning towards the other traffic. A left turn would have given you a full 270 degree and time to regroup  

Should there have been other traffic on the left base then they would be positioned further downwind from your position. You may become a conflict for them then by turning right.  Equally there may have been traffic joining downwind like you did in which case a left turn could become a conflict to them. 

This is just assumption. I'm just pointing out the need for full on situational awareness particularly in the circuit. Need to know where all traffic is relative to you. 

Finally, I would say it would have been more reassuring for the controller to specify “turn left/right now to rejoin downwind”. If you had made it to final then a missed approach would be the way out and continue rwy heading until advised.