Montgomery and Prince George's county officials, suspending their quarrel over funding for Montgomery's Ride-on bus program, agreed yesterday to ask the 1984 General Assembly to approve an additional $540,000 for the transit system.

The agreement by Montgomery County Executive Charles W. Gilchrist and Parris N. Glendening, his counterpart in Prince George's, ended their squabble over a suit Glendening filed this summer against a bicounty transit commission.

Glendening filed suit Aug. 16 against the Washington Suburban Transit Commission to force the board to release millions of dollars the two counties needed to reimburse Metro. The commission had withheld the money from Metro because the commissioners could not agree on how much each county had to pay.

One dispute was whether Montgomery should be given credit for the $540,000 it spends on its Ride-on buses. Gilchrist says Montgomery deserves the credit because the county-subsidized bus system replaced several Metro bus routes.

In filing the suit, Prince George's officials called for an end to the annual $540,000 rebate. Gilchrist responded by accusing Glendening of reneging on previous agreements.

Under the agreement announced yesterday, Prince George's will delay its suit and Montgomery will accept its share of the state transit funds--without the credit for the Ride-on program.

Additionally, both sides will ask state legislators in January to approve the funding for the Ride-on system, a 100-bus fleet carrying 100,000 passengers weekly, officials said. Blair Lee IV, Gilchrist's lobbyist in Annapolis who helped draft the agreement, said the Ride-on funding stands a "reasonable chance" of passing next year's legislature. However, officials predicted little support from organized labor or from state Transportation Secretary Lowell K. Bridwell.