Retired Navy rear Adm Walter Dedrick, 56, an engineer and former submarine squadron commander, died Wednesday of cancer at the Good Samaritan Hospital in Los Angeles. His last assignment before his retirement in 1975, was in Washington as deputy commander of weapons systems, engineering, Naval Sea Command.

Born in Long Beach, Calif., he graduated from Annapolis in 1944. He subsequently served aboard a destroyer in the western Pacific in the latter part of World War II.

Adm. Dedrick attended submarine school in New London, Conn. afte the war. He served aboard several submarines before commanding the-nuclear submarines U.S.S. Halibut and U.S.S. Thomas A. Edison.

From 1968 to 1970, he commanded submarine squadron 16, Base in Rota, Span.

He earned a master's degree in engineering from Massachusetts Institute of Technology.

After retiring from the Navy, he returned to Long Beach and joined the Northrop Corp, as vice president of the marine division in January, 1976.

His decorations included three Legions of Merit.

He is survived by his wife, Joan of the home in Long Beach; two daughters, Marjorie Starling and Kathy Dedrick, both of Virginia Beach; two sons, Dr. Daniel F. Dedrick of Boston, and Warren W. Dedrick of Alexandria; a brother, Warren Dedrick, of Anaheim, Calif.; a sister, Adena Reed, of Antioch, Calif., and a grandchild.

The family suggests that expressions of sympathy be in the form of contributions to the American Cancer Society.