A decision to move a frail parent from her home into your home is one that must be made carefully with research into the needs of the parent and the
needs of your family. These needs will come into conflict when mother moves in, and you should be prepared for the inevitable.
A direct answer to your question is, No one can stop you legally from removing your mother from care in a rehab facility. You can take her AMA (against medical advice) whenever you want, or whenever she wants to leave.
A better answer is, why would you want to remove your mother from a supportive environment before she has to leave? She is now in a place where she is growing stronger and recovering from her illness, and she should take advantage of every covered day.
My suggestion is that you let your mother try returning to her home when she is discharged. If she tries to live independently and fails, she will be much more willing to relocate to your home. If you prohibit her from trying, her dependence on you will be a source of resentment.
Some rehab facilities have a trial apartment, where the patients can go through the activities they will need to be able to negotiate after discharge. Ask her rehab whether they have this set up. Your mother should be able to get herself out of bed and into the bathroom without assistance, and be able to get to the kitchen and prepare a simple meal without assistance, at the minimum. She also needs a way to call for immediate help if she falls. Since you are out of state, she needs a way to get to the grocery, pharmacy, and physician. Ask her how she plans to manage these tasks, and consider whether her plans are reasonable.
If she cannot manage independently, ask that the facility have a physician who can make a recommendation to her about planning how and where she is going to live after she leaves the facility. If the recommendation is that she cannot return to her home, it is far better that it comes from a professional than from you!