All the modern cleaning Chemicals we use in the ER, Quick Break, Clean Break etc are specially formulated so that they form an emulsion with oil for long enough to remove the oil from the surface it is on but split up again in the Bilge Tank, so that the oil and water separate so that the oil free water can be put through the OWS.
AFF is basically a powerful detergent, but a stable one that will not split, as you say, it will clean the Bilges extremely well, but unless you can split the emulsion you will never be able to discharge it through the OWS.
Firstly (easiest) pump the lot ashore to road tankers.
Secondly, put maximum steam heating on your Bilge tank and boil off all the water, through the Tank Vents, transfer the oil residue to your waste oil/ sludge tanks and pump ashore as normal. Only practical if you can literally Boil the water off. Record the steaming process in the oil Record Book, IMO recognised this as a legitimate way of disposing of Bilge Water some time ago.
Thirdly, split the emulsion. There are two ways to do this, heat the Bilge Tank as hot as possible, (at least 90 Celsius) and keep it at that temperature continuously for several days before attempting to lower the Tank through the OWS.
The other way is Chemically, using a Flocculent, which will cause the oil droplets in the emulsion to join together again. There is a product for this in the Unitor/Wilhelmsen catalogue, but it is designed to be injected by a metering pump into the Bilge treatment system for maximum efficiency.
I would try heating the Bilge water first, then if that doesn't work on its own, heat the Bilge water and add Flocculent.
If that doesn't work then you are looking at expensive changes to the Bilge treatment system. There was a thread on this site about various methods of Bilge disposal, prompted by an Icelandic system of Conveyor belts with oleophilic brushes attached, I would have a look at that.
Some of the centrifugal separator makers have systems for separating oil from Bilge water/ sludge, but these obviously have a high Capital cost and involve extensive modifications to install them.
I am not sure why you flooded the Bilges with AFF, did you have an ER fire? Or was this required by Class or Port State? Usually the makers have a way of "Simulating" the release of the foam in order to comply with any Testing requirements from the authorities.
Good Luck with this, and let us know how you get on with the problems.
It is always better to ask a stupid question than to do a stupid thing.