After an individual pleads guilty he or she has limited appeal rights, or rights to withdraw a guilty plea. If you are considering the withdrawal of your plea you should speak to your lawyer immediately. It is difficult to withdraw a plea after sentence is imposed. You probably signed a guilty plea colloquy that was reviewed by the court with you at the time you plead guilty and were sentenced. That colloquy is intended to inform you of your rights and to limit or eliminate the withdrawal of pleas and appeals from guilty pleas. The withdrawal of a plea would ordinarily be put into a Post Sentence Motion that must be filed within 10 days of sentencing.
If one individual attempts to withdraw his plea, that should not affect the other defendant's status. Speak to your lawyer.
The DA often makes global offers in co defendant cases. In your situation you had a choice and had a constitutional right to a jury trial. You chose to plead and if you have been sentenced you have very limited rights. You have 10 days from the date of the sentence to ask for reconsideration and 30 days to appeal. You must prove that the plea was not knowing, voluntary and intelligently made. You should immediately speak with your attorney and file the necessary motion. I see it as a very difficult burden to overcome.
You are right; every criminal defendant is entitled to a trial in which the Commonwealth must prove guilt beyond a reasonable doubt. From the facts described, both individuals gave up their rights to a trial and instead elected to accept a plea offer from the prosecutor. Both were free to accept the plea offer or reject it and go to trial. Except under some exceptional circumstances, not hinted at here, the prosecutor's linking of two pleas is not unlawful, although I personally thought it was objectionable and did not engage in the practice during the 13 years I was a prosecutor. A defendant has a very limited opportunity to seek to withdraw a guilty pleas after sentence has been imposed. Should the "innocent" co-defendant be successful in that effort, it would not have any impact on the other defendant's plea and sentence. A defendant has 10 days from the date of sentence to file a motion to withdraw their plea and 30 days after sentencing to appeal to the PA Superior Court in which they could attempt to challenge the voluntariness of their plea. This is a very, very tough row to hoe and would require consulting with a criminal defense attorney experienced in post-sentence and appellate practice immediately.