Baltimore City Council President Walter S. Orlinsky, a longshot candidate for governor of Maryland, has chosen Frederick Mayor Ronald N. Young as his running mate in the lieutenant governor's slot on the ticket, knowledgeable sources said yesterday.

Young, 37, who has built a national reputation for redevelopment of his small Western Maryland city (pop. 30,000), was selected by Orlinsky to help consolidate support in the small towns and rural quarters of the state, sources said.

Twice elected as a Democratic mayor in the heavily Republican town of Frederick, Young has statewide political contacts through his work with the Maryland Municipal League, which he headed as president last year.

Young is not well know outside his native Western Maryland. Nor is he expected to attract the large campaign contributions Orlinsky need to buoy his underfinanced campaign.

The Orlinsk - young alliance - finally put together over the weekend at a restaurant near Frederick - brings to four the gubernatorial tickets contending for the Democratic nomination in the September primary.

The competing tickets feature Acting Gov. Blair Lee III running with Senate President Steny H. Hoyer, Baltimore County Executive Theodore G. Venetoulis running with Anne Arundel County Councilwoman Ann C. Stockett and Attorney General Francis (Bill) Burch running with former state Secretary of Economic and Community Development Joseph G. Anastasi.

Among Democratic contenders, only Harry R. Hughes, the former state transportation secretary, remains in the race without a running mate. By law, he will have to choose a candidate for lieutenant governor before the filing deadline next Monday.

Orlinsky, 40, who has lagged badly in preelection polls, is expected to unveil Young as his running mate at a press conference tonight in Baltimore. He and Young refused to discuss the ticket yesterday.

Neither candidate risks his current position by pursuing the governor's race. Orlinsky's job as President of the Baltimore City Council does not expire until next year. Young's team in office is scheduled to run until 1981.

Young was somewhat of a political prodigy, first getting elected as a Frederick alderman at the age of 29. He won his first race for mayor in 1973 by defeating the candidate of the entrenched Democratic organization.

Last year, he repulsed a strong Republican challenge and won a second term with 53 percent of the vote. He was one of a few Frederick Democrats to survive the election.

As mayor of Frederick, he became well-known for innovative solutions to problems of his aging city.

The city's downtown has undergone redevelopment partly as result of Young's program of tax incentives