Maybe.
There are two questions presented.
The first is whether someone who is in prison for a felony may be admitted to the practice of law. There is not a categorical prohibition on doing so. Instead, a character and fitness committee in each state to which an applicant seeks admission (even if it is a reciprocal admission) considers an applicant on a case by case basis.
Usually, people with a felony conviction that is being served or is recent are not admitted to the practice of law, but it is not a blanket prohibition, so that could happen, although it would be highly unusual.
The second question is whether someone admitted to the practice of law in good standing who is incarcerated in prison would be allowed to do so by prison officials.
The work the inmates are allowed to do is largely in the discretion of the prison warden at a particular institution. It isn't inconceivable that a prison warden could allow an inmate to do this subject to significant limitations on scope of practice, but again, it would be highly unusual.
Some factors that might encourage a prison warden to allow it would be that: (1) the state has to pay another lawyer to represent inmates in some kinds of cases if the fellow inmate does not at greater expense per hour to the state, (2) it might promote rehabilitation and garner good press, and (3) the prison warden might reasonably guess that an inmate represented by a fellow inmate is less likely to prevail on the merits than an inmate represented by another lawyer and might prefer that outcome.
The leading treatise on the subject of lawyering by inmates, with and without full or limited admission to the practice of law, is the Jailhouse Lawyer's Manual.