Professor refusing to write recommendation letter to make student work longer
Your professor is not obligated to write you a recommendation letter.
You should think about getting a letter from someone who will write a good recommendation for you.
Your professors' attitude is highly unprofessional and needs to be exposed to their academic community. When you're clear, file a complaint through proper channels to the dean/HOD. If possible, keep any record of your conversations/emails with the faculty members. Given the fact that such unprofessional behavior exists in your university (that they will ask you to work for them for 1-2 years after graduation as a condition for a recommendation letter), may be the human resource, dean office etc. themselves are unprofessional. So, tread carefully if you plan to expose their behavior. Maybe do it after you have received your degree etc. However, such behavior needs to be exposed in any academic institution for the sake of future generations.
If your foreign university asks (e.g., in future) why your own advisors didn't write you a recommendation then there is no harm in telling the truth. However, tell only the truth not your version of the truth. It's common for students at a certain phase in their career to panic, act hysterically, and believe that everyone is out to get them.
If someone declines to write an LOR for you, you should ask someone else. No one is under any obligation to write an LOR for you. Usually, when someone declines, it's because they don't feel they can truthfully write one that would be helpful. That could be because they don't know you or your work well enough or because they know you pretty well and don't think you were that good. Either way, there's no point in pressuring them to write a letter they don't want to write.
I would seek a reference elsewhere. Who is suitable will depend on the precise requirements of the program your friend is applying to, but as one of the current professors is willing to give a reference this should be sufficient to speak for their current studies - you can ask a previous employer or even your old school to provide references. My successful PhD application had references from my current employer (outside academia), a professor from my undergraduate degree and a professor I did a summer project with.
I would not pressure someone to write a reference letter that they do not wish to provide - you're relying on them to reply in a timely fashion, and to say something helpful on your behalf whilst being truthful. That isn't likely to work well if they don't actually want to do it.