Ted Kennedy has a friendly word of warning for Jimmy Carter and Fritz Mondale: watch your step when you're campaigning with Democrats in Minnesota this year.

Earlier this week, Kennedy came to this Iron Range community to help Sen. Wendell Anderson (D-Minn.) in his election campaign, and found himself trapped in a car by some 200 angry demonstrators protesting what they called the "sellout" of sportsmen's interests in Anderson's compromise Boundary Waters canoe area bill.

The day before, Kennedy just mentioned the name of the Democratic candidate for the other Senate seat, businessman Bob Short, at a Democratic rally in St. Paul, and was drowned out in boos.

The president and vice president, who are coming to Minnesota to campaign today, may well witness some of the same factionalism. But they will also learn that feuding is not necessarily politically fatal. The obituaries that have been written for Minnesota's Democrat-Farmer-Labor Party are beginning to look premature.

The party has been wracked with controversy ever since Anderson resigned as governor 21 months ago to have himself appointed to the Senate vacancy created by Mondale's election as vice president.

The internal problems grew much worse when the death of Hubert H. Humphrey robbed the DFL of its longtime leader, disciplinarian and emotional healer. The DFL convention last summer endorsed Rep. Donald M. Fraser (D-Miss.) a staunch liberal, for the remaining four years of Humphrey's term.

But in September, Fraser lost a close and bitter Senate primary to Short, a longtime Humphrey financial angel who openly sought Republican backing in the primary with an appeal to conservative economic and social issues.

In the Minneapolis-St. Paul area, where liberals are predominant, the resentment of Short was measured in the boos that followed Kennedy's mention of his name.

But up here in the Iron Range, where Fraser lost the primary by massive margins, Short is a hero for his opposition to Anderson's Boundary Waters bill, which would limit future use of the region's lakes by automobiles and motorboats - pleasing conservationists but outraging local sportsmen and resort owners, who showed up to embarrass "Judas Anderson" as their signs caled him.

Despite the north-south and left-right struggles, that have split the DFL, its election propects are looking up.

Gov. Rudy Perpich (D), the Iron Range dentist who inherited the governorship when Anderson resigned, has parlayed his populist appeal into a growing lead over his Republican rival, Rep. Al Quie. Quie, a 20-year veteran of the House, has distressed Republicans by failing so far to find any real issues on which to challenge Perpich. With Short's elimination of Fraser from the Senate race, saving Anderson has become the main goal of the DFL's liberal and labor elements. Anderson has recovered from a 23-point deficit in a mid-summer poll to draw even with Rudy Boschwitz, the plywood millionaire who is the novice GOP nominee in that Senate race.

Short, still riding the momentum of his million-dollar media campaign in the primary, holds a shrinking lead over Minneapolis lawyer David L. Durenberger, also a first-time candidate. Alone among the three major GOP nominees, Durenberger appears to be on the upswing, but it is not yet clear if he can capture enough dissident DFL votes to offset Short's inroads among conservatives attracted by his pledges of big tax and spending cuts and his opposition to much liberal social legislation.

Democrats are now viewed as favorites to hold the governorship and are close to being even-money bets in the two Senate contests. In addition, they are favored to hold the Minneapolis House seat Fraser left open and they have a good chance to take over Quie's seat in southeastern Minnesota, where Carter and Mondale will begin their campaigning today.

Still, there is no question that the two top Democrats are in dangerous territory when they come here. Mondale already has a black eye from his behind-the-scenes efforts to impose a little discipline on his party's quarrel-some ranks.

He burned up the phone lines from Washington a couple of weeks ago trying to persuade the Minnesota branch of the National Education Association to switch its endorsement from Boschwitz to Anderson - and was turned down.

He had scarcely more luck trying to pressure organized labor to swallow its objections to Short. After a visit from Mondale, the state AFL-CIO convention narrowly voted to endorse Short. But some of its most politically active unions balked and the independent United Auto Workers turned a cold shoulder to pleas from Mondale on behalf of Short.

The liberal-controlled DFL executive committee has also rejected Mondale's urgings and has not formally endorsed Short, despite his primary victory. Its decision denies him a place on some 900,000 sample ballots and legitimizes decisions by angry liberals to "cut" him at the poll.

The DFL women's caucus, furious with Short's use of the antiabortion issue in the primary, has announced it will file a formal complaint with the Federal Election Commission against alleged improprieties in his financing of "nonpartisan" right-to-life advertisements against Fraser in the primary.

In a real sense, the Democratic Senate nominees are both dependent on each other and competitive with each other. Anderson needs Short's help in the Iron Range and Short needs Anderson's help in the Twin Cities.

But every time Anderson makes a speech, as he did in St. Paul, attacking those politicians who reject the programs of the New Deal, the New Frontier and the Great Society, it sounds like he is criticizing Short. And when Short spotted the anti-Anderson pickets here, he rushed forward to tell them how he had been booed at the Anderson rally in St. Paul and to inform them he had already sent Carter a telegram urging him to veto Anderson's Boundary Waters bill.

With friends like that, the DFL Senate candidates hardly need enemies. Meanwhile, Republicans complain that Boschwitz and Durenberger are proving so far to be less than aggressive foes. Boschwitz has already spent more than $1 million in a campaign that began 16 months ago. He is plainly disconcerted at the rapid evaporation of his lead in the last six weeks. Anderson further embarrassed him by charging "political espionage" in the Boschwitz campaign's unexplained acquisition of a copy of some unused Anderson television ads.

Boschwitz has hit back in TV spots of his own, aimed at Anderson's high absenteeism in the Senate in this campaign year. "Wouldn't you think," the Boschwitz ads say, "that if he appointed himself to the job, he'd at least show up for work?"

Durenberger, by contrast, has been slow in collecting campaign funds and cautious in bidding openly for dissident liberal Democratic support. He accepted the endorsement of the liberal Americans for Democratic Action after Fraser's primary defeat, but underlined his disagreement with the group on many issues. Last weekend, he balanced a visit to the liberal parishioners at the Minneapolis Unitarian Church with an appearance at a dance sponsored by the Minnesota Citizens Concerned for Life, an antiabortion group.