So, when I was 15 I went to Berlin and I vaguely remember a guide in a museum telling us that you could technically ask the East German government for a Visa to immigrate to West Germany... it usually took years, your social life was over (your friends were ordered not to speak to you anymore), and life was basically hell for your family but after a few years you could get your paper to leave...
Is that true?
Short answer: Yes.
If you legally wanted to leave the GDR, you had to fill out an Ausreiseantrag, or Antrag zur ständigen Ausreise aus der DDR (Application to permanently leave the GDR). By doing that you also renounced your GDR citizenship automatically according to § 10 of the DDR-Staatsbürgergesetz (roughly translates to GDR citizenship law).
Since this meant you also actively opposed the GDR system, the MfS (Ministerium für Staatssicherheit aka Stasi) could potentially categorize you as an enemy of the state, a feindlich-negative Person (hostile-negative Person). During the process, which you mentioned could take months or years, there could also be repercussions such as loss of your job (and also the jobs of family members) et cetera. Following MdI orders 6/77 and 118/77 (both 1977) the Stasi was supposed to find out as much as possible about the living situation, motives, job function and contact with other applicants for an Ausreiseantrag about every applicant (order 118/77). Also the MfS, SED (the political party) and the employer of and applicant were supposed to talk an applicant out of leaving for West Germany using as much authority as possible.
It was easier to apply for that Ausreiseantrag if you were a pensioner already. Since the GDR also needed to provide pensions, just as the FRG, this was an economic burden so old people had it a lot easier to get approved to leave for West Germany.
Hope this helps.
While there were mechanisms for legal emigration, the GDR's Interior Ministry and other state organs did throw considerable legal obstacles in the way of emigration. There was a formal application process and the applicant had to explain their rationale for leaving. The arbiter of the process was the state and applicants often found that they had to meet the state's criteria for a justified emigration.
Legal emigration from the GDR was not consistent and policies varied over time. In the regime's first years, there still was the legacy of the war and German division that divided and broke families. Elderly Germans or their blood-relatives, for example, moved across the border to take care of indigent relations. Moreover, there was a visa system for visiting the FRG that many GDR citizens took advantage of to defect as once they were across the border they would stay in the West. Emigration waves, both legal and otherwise, crested at various crisis points in the Cold War prior to 1961 as many GDR citizens feared that the SED would close off the avenues for leaving the country. These were avenues were nominally legal, such as using a travel visa to leave, and were a way to sidestep official appeals for emigration. But , although it occurred at a much lower rate in the 1950s, legal appeals for emigration was a consistent number of those leaving the GDR. By the mid-1950s, the GDR was already narrowing the visa laws for visiting the FRG and the erection of the Berlin Wall removed one of the last bypass grey routes for emigration. After 1961, emigration was now in the hands of the state.
The scenario described by the OP's tour guide applies for the post-Wall period through a good chunk of the 1970s. The legal emigration process was filled with bureaucratic hoops and preconditions, but also a layer of suspicion by the state that an applicant would have been a candidate for Republikflucht in earlier years. Applications thus became a red flag for state surveillance and poking around in an applicants' background. The state could deny the application for arbitrary reasons ranging from prior family members leaving the country illegally or value-judgements on the applicants' moral fibre. Pensioners found it much easier to gain official permission to emigrate, and travel visas could also be acquired for visiting family events, provided the applicant was in good standing with the SED and the Western family close blood relations.
The fruits of Ostpolitik and the new politics of the 1980s led to the SED softening its line on visiting the West. Although the SED was still a neo-Stalinist entity, it did liberalize its visa application process in this period as part of what emerged a last-ditch effort to buy popularity. By 1982/3, emigration numbers and applicants had actually managed to reach pre-Wall levels, as did Republikflucht numbers. The old stigmas were not completely erased, but the state tended to be more flexible with its stance towards leaving the GDR, which many GDR citizens took advantage of, hinting that some of the fear of state reprisals associated with leaving had dissipated somewhat.