Proof all reversible engines operating between 2 reservoirs have Carnot efficiency, applied to irreversible engines? https://www.ques10.com/p/7650/show-that-the-efficiency-of-all-reversible-heat-en/
I was trying to find proof about how all reversible engines have the same efficiency as Carnot engines and found a lot of proofs quite similar to the one linked above. 
Take a Carnot engine and use it to run the "less efficient" reversible engine in reverse, this leads to a violation of thermodynamics and hence the initial assumption must be wrong. The same proof can be run through with the reversible engine as more efficient and again there is a violation. This means all reversible engines are of the same efficiency as Carnot engines.
My question is, why can't this proof apply to irreversible engines? In the linked proof above, what line is only true for reversible engines, and not true for irreversible ones?
I feel in the proof I have linked, there is no result used which is only true for reversible engines, such as the change in entropy of the system being 0.
 A: 
I feel in the proof I have linked, there is no result used which is
  only true for reversible engines, such as the change in entropy of the
  system being 0.

If this is the basis of your concern for the proof, then you should know that the change in entropy of the system operating in a cycle is always zero, regardless of whether the cycle is reversible or irreversible. 
When completing a cycle the system is returned to its initial equilibrium state. That means that all system properties, including entropy, are returned to their initial values. It is the change in entropy of the surroundings that differs. That change is zero for a reversible cycle and greater than zero for an irreversible cycle. 
When a system cycle is irreversible it means that entropy is generated in the system. In order to return the system to its original entropy, the additional entropy generated due to irreversibility has to be transferred to the surroundings in the form of heat. 

But in the actual proof, where did they use any result that is not
  true for all engines in general? My concern was wrong I agree with
  that, but my question still stands.

The key point in the proof is the following bullet:
The net result is that heat WA–WB is taken from sink and equal amount of work is produce. This violates second law of thermodynamics.
This means it violates the Kelvin-Plank statement of the second law which is
No heat engine can operate in a cycle while transferring heat with a single reservoir
Taking heat from a single reservoir (in this case the sink) and producing an equal amount of work violates the Kelvin-Plank statement.
The Corollary to the Kelvin Plank statement is
No heat engine can have a higher efficiency than a Carnot Cycle operating between the same reservoirs.

From the diagrams, it does not seem obvious to me that the work should
  be any different for any other engine. I understand once you have
  arrived to the final statement that the net work done = the heat taken
  from the reservoir, there is a violation of the second law.

The cause of the confusion is the second diagram is wrong. For one thing, the input to A does not equal the sum of its outputs. For another, the output required by A to operated B is incorrect. The diagram should be as I show it below.
In order to run B in reverse A only has to supply work equal to $W_B$. Since for the super efficient A we have $W_{A}>W_{B}$ A now has a net work output of $W_{A}-W_{B}$ shown to the left that it can use for other purposes. Since the heat removed from the high temperature reservoir by the super efficient heat engine equals the heat put back by the reversible refrigerator, there is no net heat transfer to the high temperature reservoir, $T_1$. Therefore the overall result is A has taken heat from a single reservoir $T_2$ and produced a net work output of $W_{A}-W_{B}$, in violation of the Kelvin Plank statement of the second law.

If I am not mistaken, based on your answer if the refrigerator was
  irreversible, some heat would be lost to the surroundings. Is this
  correct?

Yes it is correct, but I would not necessarily use the term "lost". Better to say more heat must be transferred to the high temperature surroundings for the same  desired heat extracted from the low temperature surroundings meaning more work input is needed than for the reversible refrigerator. There are various possible reasons for the irreversibility. One is mechanical friction, in which case the term heat "lost" comes to mind. But there are irreversible processes that do not involve mechanical friction as well. 
An irreversible refrigerator requires more work input to extract the same heat from the low temperature reservoir resulting in lower efficiency (meaning, for a refrigerator, a lower coefficient of performance). That means more heat has to be rejected to the high temperature environment for the same amount of heat taken from the low temperature reservoir. 
An irreversible heat engine has a lower work output for the same heat input for a lower efficiency. That means the irreversible heat engine transfers more heat to the low temperature reservoir than the reversible engine, leaving less heat to perform work than the reversible heat engine.
In both cases the reason for the lower efficiency is that entropy is generated in an irreversible cycle. In order to complete the cycle and return the system to its original entropy the generated entropy has to be transferred to the surroundings in the form of heat. @Chet Miller in his answer shows mathematically how that lowers efficiency.
The proof that is the subject of your post assumes the two devices are reversible, that is, they have the maximum possible efficiency for the cycle, regardless of the details of the cycle. It only seeks to prove that all reversible engines operating between two fixed temperatures have the same efficiency.
All of this relates to Carnot's theorem, which can be stated as follows:
"The efficiency of all reversible engines operating between the same two temperatures is the same, and no irreversible engine operating between these  temperatures can have a greater efficiency than this"
The proof under discussion only relates to the first part of the theorem (which I show in italics). @Chet Miller  addresses the second part of the theorem.
Hope this helps.

A: For an irreversible engine, you have for the change in entropy of the engine working fluid: $$\Delta S=\frac{Q_H}{T_H}-\frac{Q_C}{T_C}+\sigma$$where $\sigma$ is the entropy generated within the engine per cycle (a positive quantity for an irreversible process), and the Q's are also per cycle.  Since the engine is operating in a cycle, the entropy change for the engine working fluid is zero.  Therefore, we have $$\frac{Q_H}{T_H}-\frac{Q_C}{T_C}+\sigma=0$$or, equivalently,$$Q_C=\frac{T_C}{T_H}Q_H+\sigma T_C$$
The efficiency of the engine is given by $$\eta=\frac{W}{Q_H}=\frac{(Q_H-Q_C)}{Q_H}=\left(1-\frac{T_C}{T_H}\right)-\frac{\sigma T_C}{Q_H}$$The first term on the RHS is the Carnot efficiency, and the 2nd term is clearly negative.  So the efficiency of an irreversible engine operating between the same two temperatures as a Carnot engine is less than that of the Carnot engine.
