Would something like CRISPR fit your criteria? CRISPR is essentially an adaptive immune system for bacteria. When a bacteria encounters foreign DNA (usually from an invading bacteriophage), it can cut it up and insert part of it in between palindromic repeats called CRISPRs. This small piece of DNA can be transcribed and then used as a template to recognize other copies of the foreign DNA. When a match is found, the foreign DNA is degraded, impairing the invading virus. Because a record of this foreign DNA is stored in the bacterial chromosome, it is transmitted to daughter cells, which will now have some protection against the offending virus in the future.
In the same vein, when certain bacteriophages invade bacteria, they integrate their viral genomes into the host bacterial genome---phage lambda is the classic example. At this juncture, the phage can choose between two lifestyles: lysis, in which the virus replicates like crazy, killing the host cell and spreading to other cells; or lysogeny, in which the virus lies dormant, allowing its genome to hitch a ride in the host genome, getting replicated and passed on to daughter cells just like any other piece of chromosomal DNA. When the time is right, the virus can switch back to lysis, proliferate, and infect new cells. Thus viral invasion of an asexually reproducing organism can lead to heritable changes in the host genome.
I'm sure you've heard of epigenetics, in which environmental factors can cause heritable changes to an organism without specifically mutating genes. While typically appreciated in eukaryotic organisms, asexually reproducing bacteria also have epigenetic mechanisms (1).
(1): Casadesus J and Low D. (2006). Epigenetic gene regulation in the bacterial world. Microbiol. Mol. Biol. Rev. 70(3): 830-56.