There isn't an exact science or right answer regarding placement since every platform or application is different. There are a few things to consider that can help guide your decision.
1. Consistency - Thinking about the platform as whole versus looking just at the use cases of these solitary elements will increase the usability. Is CANCEL always in the right-most position, or is the MOST IMPORTANT action (call-to-action) always on the right?
2. Visual styling - If there are two buttons - one is the intended use case, the other is a fallback - you could do exactly what you did and make the secondary action seem less bold and attention-drawing via a stroke treatment. That visually separates into "DO THIS" and "this is here if you need".
3. Scalability - If you always have a single button on the right, what happens when you add another one or two buttons? This is scalability and applies well beyond buttons. I'd recommend against using a left and right justify. I would instead recommend sticking with one (left/center/or right), in your case right, and using visual styling to differentiate.
Also, no need to reinvent the wheel. Users learn to expect things to be in certain places for certain uses. Do some light research on what others do, especially the big dogs (Google/Facebook/Apple/etc.) since they are the most used. For buttons on modals, the norm is usually centered or left-justified on the bottom.