As for the hadeeth of Aa'isha - may Allah be pleased with her - it is half of knowledge since actions are either manifest or hidden. The scale for the hidden actions is the hadeeth of 'Umar bin Al-Khattaab - may Allah be pleased with him - who narrated that the Prophet (ﷺ) said, “Actions are judged according to intentions, and everyone
certainly has his intent.”(1) On the other hand, the measure for the open deeds is this Hadeeth of Aa’isha that: “Whoever invents in this affair of ours that which is not part of it, shall have it be rejected.” That is, it will be rejected from the individual and not accepted from him.
His statement: “...this affair of ours” means, “our religion, our Sharee’ah.” Allah – the Exalted - says:
“And thus we have sent to you (O Muhammad) Ruuhan (an inspiration and a mercy) of Our command.” (Ash-Shoorah: 52).
Allah’s order referred to in this hadeeth are His Legislations; whoever brings anything in to it, not part of it, shall have it rejected. This is clear evidence that when we do not know a particular deed by which worship is intended to be established in Allah’s religion; such will be rejected. It could also be deduced from the hadeeth that knowledge necessary since worship involves conditions and pillars or even some doubt with preponderating aspects of being the truth if absolute truth may not be attained as we have in certain circumstances.
For instance, the Prayer; when you doubt the number of units even though a particular number of units is more preponderant in your mind to be right; then depend on the weightier. Likewise, the circumambulating of the Ka’bah is seven rounds; if you are uncertain of the number you have performed, you should depend on the more dominant number in your thought. The same principle applies to purification; if you believe you have perfected your ablution; then that suffices.
The point here is that knowledge or preponderant assumption is incumbent if textual evidences point to its sufficiency; otherwise, the act of worship will be rejected. If an act of worship is disallowed, it becomes forbidden for the individual to give worship to Allah therewith because if he gives worship with a thing Allah is not pleased with, something He has not legislated for His creatures, the individual turns like a person making mockery of Allah – and the refuge is with Allah!
In fact, some scholars say: When a person intentionally observes the Prayer in a state of impurity; he would be renegading from Islam because he is making mockery. Contrariwise the one who forgets, he has no sin even though he will repeat the Prayer.
In the second version (of the hadeeth), it says: "Whoever performs an action which we have not enjoined, will have it rejected."(1) This is severer than the first version. Because his statement: "Whoever performs an action which we have not enjoined" means that, it is necessary for us to know whether our actions are based on approvals from Allah – the Exalted - and His Messenger (ﷺ); otherwise, it will be rejected. This includes the acts of worship and social interactions.
Therefore, if someone engages in trade proven to be void, mortgages illegally or bequeaths an endowment in a forbidden manner, all these are wrong and they will be rejected from the person; they are invalid. And Allah knows Best.