If we ask Allah to remove something from our past like it never happened, can He do that? I know Allah works in ways we couldn't even imagine.
Depends on what you mean by changing the past as some notions of it are possible some others not.
For example we know that whatever we do (good or evil) is recorded by angels or imprinted in our soul. But the concept of repentance and nullification (habt) in Islam imply that these effects can be altered by doing their antitheses: sins by good deeds; and good deeds by sins! This is the only notion of “changing past” that seems reasonable.
But by “changing past” if you are suggesting that God can somehow manipulate what took place in the past, that’s a logical impossibility, firstly because past is past (a no-longer-existing reality) so how can God change something that does no longer even exist? Or assuming that He could, how could he change the past without affecting the present moment?
Therefore it is really impossible for Allah to change the past in that sense, nevertheless, similar as with the answer to the Omnipotence Paradox, this statement should not be understood as implying that Allah is incapable of something! This demands an extensive philosophical discussion that might be beyond what you really expected in an answer but if you are a serious thinker you will appreciate my elaborations below.
As you saw, changing the past implies two impossibilities; one of them (changing what no longer exists) is definitely absolute, that is not possible under any circumstance. But Muslims and theists in general are automatically hesitant to accept any statement that seems to imply 'impossibility' when the subject in the statement is 'God' for the fear of the negating the belief in God's omnipotence However that assumption is the result of poorly formulated logical concepts of God (if not total lack of any consistent logical definition), which is, by the way, very prevalent among both theists (laymen and scholar) and atheists.
But enlightened theist philosophers of the Peripatetic tradition argue that inherent logical impossibilities do not really suggest incapability for God, provided that we have a definition of God that is based on principles of logic (e.g. non-contradiction etc.) and consistent with other interrelated, proven philosophical theories.
To elaborate, if we establish as a “consistency framework” (for lack of a better term) that 1) "God is omnipotent," with 2) omnipotence defined as "capable of everything that is logically (i.e. inherently or essentially) possible," then 3) an absolute logical impossibility (regardless of particular instances) will not contradict God's omnipotence by definition.
The basis for theoretical limitation of God’s omnipotence to only logical possibilities (and how that doesn’t limit Allah’s power in reality) is the premise that God is the supreme existence. A supreme existence is that which is the source of everything. Therefore, logical rules that refer to governing laws of being can in turn be argued to be emanating from God’s existence. This also solves a common confusion between the logically-bound concept of God as opposed to His totally unbounded reality which is usually expressed in terms similar to "How can God be bound by rules of logic when He is all-capable?"
The implication of tracing rules of logic to God's existence is that if something is proven to be logically impossible, from a Theist worldview, it can be explained as God having not desired that thing to take place in the first place or that thing having not had any place in God's essence which is source of all reality! This renders questions such as "Can Allah change the past (which is a proven logical impossibility)?" to "Is Allah capable of changing what He has already decided not to be changeable?"
The answer to the reworked question in turn could also be both negative and positive as in "No, he is not, so long as He has not yet willed to change a law that has been in effect since the beginning of creation." and as in “Yes, he is if he wills so but so far he hasn’t” with neither of them contradicting God's omnipotence.
Yes, it is possible for Allah to remove your past as if it has never happened. That's because He says in the Qur'an (Q24:45):
"... Allah creates what He wills. Verily! Allah is Able to do all things."
I believe the more appropriate question to ask is: would He do that? As you know, it's not all our prayers that get answered. One of the possible reasons is due to Allah's wisdom and overriding order that He has already established. You may well ask, is it possible for Allah to make me not to die? Is it impossible for Him? No, of course not, but He had already decreed that "Every soul must have a taste of death" (Q3:185). Essentially, you're praying to Allah to act against His Will! However, Allah can overlook the past such that it's as if we have not committed a sin - for example - in the first place. This is available to anyone who makes sincere repentance to Allah and mend his/her ways.
First of all, whatever happens, happens with WILL of Allah. If something has happened, then its surely for your betterment. You just have to put your trust in Allah, and don't try to Change what has happened, instead, try to see the wisdom behind that happening that why it happened. Even if you might not find a clue that what was beter in it, still you have to trust Allah, that your creator never want anything BAD for you. It's just your limited knowledge, based on which you think that certain happening was WRONG and should NOT have happened. So dont worry
Allah has power over all the things. He can change the past also. But at the same time He is not unjust to anybody. Once you have done something wrong its done. On the basis of that you will be judged. So ask for forgiveness. He is the most merciful.
If He changes your past, what about others related to your past? He can fix that also. But He says He is just.
Even if He can, I don’t think He will do it just because of you.
Allah knows all, He is best. He is best of the judges. He is all wise. He is just to everybody.
ALLAH is able to do anything this is overt because in the Quran it says "indeed ALLAH is able to do all things".
This can relate to me as i use to commit so many bad deeds and these deed shattered me like glass and i always felt guilty also ashamed, however, i remembered ALLAH is able to do anything so i prayed that my past (bad deeds) is not part of me; I swear to God i forget the majority of my bad deeds in like 2 days. it was like i didn't commit them.The minor sin that ALLAH left for me were probably reminders of not to go back to my old ways and live a new person.Always have faith in ALLAH.