MAZATLAN, Mexico (AP) _ President Reagan and Mexican President Miguel de la Madrid met in this sun- drenched resort Saturday, stressing positive relations but acknowledging sharp differences over Central America policy and illegal drug trafficking.

De la Madrid, at a luncheon with Reagan, complained that Mexico's efforts to curb drug production and trafficking ''are still not appreciated to their full extent'' and are the target of ''disinformation.''

He said it was unlikely that any country devoted as much resources to the fight as Mexico.

In a pointed reference to the United States, de la Madrid said the battle against drugs cannot be won unless drug consumption is attacked with the same vigor as the fight against production and trafficking.

Although about 25 percent of the Mexican army is engaged in the antidrug campaign, the United States says the effort is not enough, is hampered by official corruption and that the flow of drugs is increasing.

Reagan, in his luncheon remarks, said, ''The people in the United States are now turning away from drugs'' and that development ''should curb the demand that fuels the trafficking.''

The two leaders held private talks in a seaside hotel in Mazatlan, which is in the state of Sinaloa, the main center for Mexico's illegal drug trade. Following the four-hour meeting, Reagan was flying to California for a four- night stay at his Santa Barbara ranch.

The leaders conferred privately for 45 minutes with only notetakers present. Reagan told de la Madrid that Mexico has been very cooperative in fighting drugs but urged him to work harder.

''This is the year we have to show results,'' Reagan told the Mexican leader, according to a White House statement.

Reagan pronounced himself ''extremely pleased with our discussions and the remarkable record of achievements'' of their talks.

As they posed for pictures, Reagan was asked if he agreed with de la Madrid that drug use was the root of the whole problem. ''It always has been,'' Reagan replied.''

Elliott Abrams, assistant secretary of state for inter-American affairs, told reporters on Air Force One there was ''a serious possibility'' the United States would find that Mexico should remain eligible for aid from international financial institutions even though its drug program falls somewhat short.

A firm opponent Reagan's campaign to fund the Contra rebels in Nicaragua, de la Madrid called for negotiated settlements in Central America ''that take into account the legitimate and essential interests of the parties in conflict, with a sense of fairness and even-handedness.''

He said peace would be possible only if all the governments of Central America ''comply with the commitments that they have made at the highest level.''

For his part, Reagan said ''our commitment to democracy in our hemisphere must be unshakeable.''

He said totalitarian systems in the Soviet Union, Cuba and Nicaragua ''have demonstrated for all to see that tyranny doesn't work. Mexico and the United States have a common interest in stable, free and democratic governments in this hemisphere.''

He expressed hopes for a common U.S.-Mexican stand ''against the expansion of totalitarianism.''

The White House statement said Reagan, in his private talks, underscored his support for the Contras and ''repeated his commitment to the peace process.'' It quoted de la Madrid as saying Mexico is supportive of the four- nation peace accord signed in Guatemala.

Later, at a briefing for reporters, Secretary of State George Shultz said that while differences over Central America were discussed, ''there were no heated words.'' Asked whether the two sides had come closer on the subject, he said, ''that was not a particular focus'' of the talks.

Asked if Mexico should do more to combat drugs, Shultz said, ''Yes, and so does the United States. So do we all. It's a tremendous problem.''

In his luncheon remarks, de la Madrid said Mexico's huge foreign debt - $105 billion - ''continues to be one of the major obstacles to development in my country.''

He said ''there is an urgent need ... to find new formulas to adjust debt servicing to the capacity of debtor countries to pay and to permit them to boost growth and recover their living standards, which have been so greately affected by this long crisis.''

Reagan said there is ''reason for optimism'' on the debt problem. He said Mexico's plan to exchange some of its debt for special bonds which are backed by U.S. zero coupon bonds was an innovative idea.

Reagan got a red-carpet welcome and a 21-gun salute as he stepped off Air Force One.

In his welcoming remarks, de la Madrid said, ''Today, we affirm that our relations are conducted on a very positive level.''

He said their summit - the sixth and final meeting of the two outgoing presidents - would ''strengthen the basis for good and productive relations'' and be a forum for discussing problems ''as frankly as we always have.''

Reagan cited U.S.-Mexican steps on trade, economic problems and law enforcement and said, ''We can be proud of what has been accomplished in so short a period.''

He said their meeting paved the way for ''a new generation of political leaders in both our countries who will soon follow us and build on the foundation we've laid.

''That foundation is cemented by our shared values and common goals - a better quality of life for our peoples, opportunties for our children and the dignity of living peacefully in free and democratic societies,'' Reagan said.

He said much remains to be done ''but we can be proud of the legacy we leave.''

While the two leaders met, senior officials from both countries held talks of their own, focusing on foreign policy trade, drugs and law enforcement.

Reagan was accompanied by Shultz, Treasury Secretary James A. Baker III, Attorney General Edwin Meese III, and Trade Representative Clayton Yeutter.

One agreement was signed, allowing more Mexican textile and apparel exports into the United States.

The agreement, already in the process of being implemented, gives Mexico, the sixth largest supplier of textiles to the United States, an automatic 6 percent increase in exports to that rich market in the next four years.

Although minor in scope, the pact symbolizes the cooperation between the two countries as Mexico seeks to increase its exports and at the same time open its own market to more U.S. products by reducing tariffs.

Another accord, dealing with telecommunications, had been expected to be signed, but was pulled back because of a ''last-minute minor screw up,'' said Abrams. He said he expected it would be signed in a few days.

Reagan also devoted his weekly radio address to the summit.

While avoiding direct criticism of Mexico's support of the leftist government of Nicaragua, Reagan said the establishment of Soviet- and Cuban- backed totalitarian regimes is ''a threat to stability and freedom.

''Nowhere is that threat more acute than in Central America,'' Reagan said. ''I would hope that the United States and Mexico will find common interest in opposing any such totalitarian threat.''

The summit falls just two weeks before Reagan must ertify whether drug trafficking nations such as Mexico have made adequate progress attacking the problem.

For nations that fail to win certification, the United States is required by law to vote against proposed loans in the World Bank, International Monetary Fund and other international financial institutions.