Poland's new President, Andrzej Duda, has warned that the European Union would face a "very serious crisis" if the UK were to leave.
UK PM David Cameron has promised a referendum on EU membership by the end of 2017 and is pushing for reform.
Speaking to the BBC, Mr Duda said he wanted to see the EU "fixed" to make it more efficient and more democratic.
But he criticised Mr Cameron's key proposal to delay in-work benefits for new EU migrants for four years.
He said he would not accept any EU labour laws that could discriminate against individuals from particular member states.
Correspondents say Mr Duda's surprise election victory in May signalled a shift to the right in Polish politics.
He is an ally of the ruling conservative Law and Justice Party (PiS), which has clashed with domestic and EU critics in recent weeks over claims it is trying to manipulate state institutions.
Speaking to the BBC, in his first interview to international broadcast media as president, Mr Duda said the EU had "many weaknesses" and warned a so-called "Brexit" from the bloc could cause further havoc.
"The EU has been shaken time and time again with crises - whether it's the financial crisis, or the refugees crisis," he said.
"Let's not pretend, a UK exit from the EU will be a very serious crisis for the EU. Of that I have no doubt."
He said Poland's new leaders were not Eurosceptics but "Euro-realists", and that he wanted the EU to change.
MEPs from his PiS party sit with the British Conservatives in the European Parliament.
UK's EU referendum in-depth
"We want the EU to be efficient. So that it will foresee any possible future problems that are coming its way."
But he said he did not agree with Mr Cameron's drive to allow EU migrants to receive in-work benefits only after living in the UK for four years.
"I do not agree with contravening our basic freedoms, which we have in the EU framework - one of which is the principle of non-discrimination," he said.
"And this is where I am completely against changing that principle."
Mr Duda also commented on protests in recent weeks against planned changes to the Constitutional Court which critics say will undermine its ability to hold authorities to account.
The legislation requires cases to be adjudicated by a panel of at least 13 of the court's 15 judges - the minimum is between five and nine under the present system.
The change was approved by the lower house of Poland's parliament on Tuesday and now goes before the upper chamber, also controlled by PiS.
Mr Duda accused the protesters of not accepting the results of the October elections.
"These demonstrations are, above all, made up of those who until recently governed Poland - and who were removed from power by Polish voters in the general election," he said.
"They simply do not want to accept this."
The head of the European Parliament, Martin Schulz, has criticised the Poland's new leadership, denouncing a "a lack of solidarity" over the refugee crisis.
Mr Duda told the BBC the country welcomed "people who wanted to come here" but repeated the government's refusal to accept mandatory quotas for resettling asylum seekers.