Are apricot seeds safe to consume as food? I've heard thay containe a substrance that may convert into cyanide.
It depends on the amount consumed. The main culprit is amygdalin, which is present in the seeds of many different fruits/vegetables, as shown on some of the charts in this comparison. Amygdalin breaks down to cyanide when the seed is chewed and digested. (The chewing and breaking of the outer shell is necessary to release the amygdalin).
However, one or two seeds is probably not going do too much, as the amount released is minute.
In the case that you cite, the person had been self medicating with apricot seed tablets in an attempt to cure cancer (promoted in the 1950's, since debunked), as well as grinding up the pits to consume as a tea.
However, as with many things, young/old/health compromised individuals may be more susceptible. As this brief medical review shows, over a 4 year period at a single university hospital, 13 children were admitted with cyanide poisoning from eating apricot seeds.