Carteret Savings Bank of New Jersey, the nation's 18th-largest thrift institution, has obtained the right to do business in the Washington area by buying ailing thrifts in Maryland and Virginia.

The Federal Home Loan Bank Board, which regulates the nation's thrift industry, said yesterday it had approved Carteret's purchase of Admiral-Builders Savings and Loan Association, a state-chartered mutual institution in suburban Baltimore.

The bank board said it also approved Carteret's acquisition in Virginia of First Federal Savings and Loan Association of Blacksburg and Mountain Security Savings Bank of Wytheville.

The acquisitions give Carteret the right to branch anywhere in Maryland and Virginia. The bank board, under newly adopted federal rules, also gave Carteret a green light to open branches in the District in exchange for taking the troubled institutions off their hands.

The bank board, whose federal insurance fund is straining under record S&L failures, has relaxed branching rights to entice healthy S&Ls to buy ailing ones.

For 5,600 of Admiral-Builders' customers, the acquisition meant they yesterday had unrestricted access to $40 million in deposits for the first time since May 1985, when Maryland's savings and loan crisis hit and a $1,000 monthly limit on withdrawals was put in effect.

Carteret becomes the second-largest thrift company with operations in the Washington area, which banking analysts say is among the fastest-growing and most-profitable banking regions in the United States.

Its presence increases the number of competitors in the D.C. market, and it puts Carteret a step closer to becoming what Carteret Chairman Robert B. O'Brien Jr. called "an eastern regional financial institution" with branches from New York to Florida.

"We are delighted . . . to broaden our retail banking coverage, especially in the Baltimore/Washington D.C. area," O'Brien said, adding that any losses from the acquisition will more than offset by the opportunity to enter that market.

Carteret paid no money for the three S&Ls. Instead it assumed millions of dollars in potential losses because the liabilities for the three thrifts exceed their combined assets by $12 million.

Federal regulators said that they voted last week to give federal insurance to Admiral-Builders depositors and then to merge the S&L into Carteret. In addition, the bank board said it has agreed to shoulder any further losses connected with the acquisition of Mountain Security.

Admiral has two offices in the Baltimore area. The Virginia thrifts have a total of six offices, all in the southwestern part of the state.

Carteret spokesman Nick Gicas said he did not know when Carteret might set up branches in the District or in the surrounding suburbs, "But we plan to definitely have a presence in Washington."

Carteret's acquisitions took effect Friday at 7 p.m., but were not made public until yesterday, when notices of new ownership were sent to depositors. The three institutions will be renamed Carteret Savings Bank, although putting the new name on all signs and stationery could take several weeks, Gicas said.

Carteret, which has 52 branches in New Jersey, has assets of $5.1 billion and earned $25.2 million in fiscal 1985, which ended Sept. 30. Of S&L companies with operations in metropolitan Washington, only PSFS Bank of Philadelphia, which ranks as the nation's fifth-largest S&L company, is larger.

Carteret launched an aggressive growth campaign in 1982, when it acquired an ailing Florida S&L that had 12 branches in one county. Now Carteret has 37 branches throughout Florida and 52 offices in New Jersey.