In a tournament, especially with a significant $ entry and payout and I assume a $ player auction, with a ref overseeing a number of matches at the same time, particular when considering all-ball-fouls enforced, unless you had 100% certainty you could remove the template without disturbing any balls, clearly you should have waited on the ref to remove the template. If he screws up and accidentally moves a ball, he makes the appropriate decision how to best handle it.
Yes, it’s nitty of your opponent to call a foul on you and demand ball-in-hand, but he was trailing in the match to you at that time and needing some help, and you presented the opportunity. You do have to acknowledge some responsibility for your error in judgement.
In my opinion, if I was the TD / ref in that situation, the correct thing to do considering your accident is to offer your opponent the option of them moving the ball back to where they think it was, or leave it as is - whichever position they figure is most beneficial to them. If they choose a location for it to be replaced that in your judgement is not accurate and even more to their potential advantage, that’s just the breaks and the penalty for your error in judgement.
Give us a follow-up as to the outcome - who won that game and who won the match?