Nothing can occur outside of His Will and Power.
But, say, He doesn’t want you to sin. So, He allows a devil some power of temptation over you, but not enough to overpower you if you call on Him.
This is a way to make you stronger. We should be thankful to God when we are tempted or have great suffering, for it is a chance to grow in Holiness.
How do we define sin? Easy: that which offends God.
So, if God tells us to sanctify the Lord’s Day and keep it Holy, and we perfectly know that, but don’t anyway, then that would be sinful.