The only legitimate way is to simply purchase a refundable ticket. Sure, it usually costs more but if you do your homework, you should be able to get the entire thing refunded - just make sure you do the aforementioned homework as many carriers may charge you a fee or three.
Aside from this, there is no way around the rule without breaking it (or at least heavily bending it).
As a side note, from experience I have not once entered a country where this rule existed and they have questioned me on my exit strategy. I’ve discussed this many times with fellow travellers and some have done the refundable or fake ticket trick. Other travellers have said that they will pull the “oh, my tickets are with my friend, I’ll go get them” trick, leave the queue and purchase tickets online on their phones. I’m yet to hear anyone who has actually tried that though.
The only times where I’ve spoken to someone where the issue has been raised was when the airlines themselves kicked up a fuss. They do this as if you are denied at the border they have to fly you back to where you came from and they don’t particularly want to be handing out free flights. As a traveler, you have a ability to ask for a waiver to sign that forms a guarantee with the airline, stating you’ll pay for the fare. This is usually backed with a credit card.
The essence of the rule is to make sure you are not planning on illegally staying in the country for longer than your stay allows. As an extra precaution if you are tempting fate with no return ticket, keep copies of your bank statements showing that you have a healthy balance and that should keep the powers that be happy.