The ahnen numbering system is a straightforward method of numbering ancestors.
More precisely, it actually does not number ancestors,
but ancestral slots, whether any ancestors are known or not, and it assigns just one number to each slot.
When pedigree collapse occurs, a single ancestors appears in multiple slots, and thus has multiple ahnen numbers.
When there is both a biological and an adoptive father in the same slot, there still is just one number for that slot.
Simply assigning the same number to both fathers is a no-no; different individuals must have different numbers.
Two fathers can be assigned the same report number, just not at the same time, in the same report.
You can show the biological father in one report, and the adoptive father in another.
That way, they'd receive the same report number in two different reports.
You desire is to show both fathers in the same ahnenlist, and still use ahnen numbering.
Adopted children are easily accommodated in descendancy reports,
but there seem to be few attempts to accommodate multiple pairs of parents in ancestral overviews.
The only one I know of is one I created and called the Extended Ahnenlist, introduced in Adapted Ahnenlist.
Alas, using an Extended Ahnenlist is easier said than done, because no genealogy software provides this report type it yet.
The Adapted Ahnenlist article was published in 2010, just before the articles that introduced scientific genealogy, and that shows.
The terminology used needs work, but I'll use the same terminology here for consistency's sake.
The article illustrates the Extended Ahnenlist with a tiny example involving both biological and adoptive parents,
distinguishing between a birth ahnenlist that shows only biological parents,
and a family ahnenlist that shows all the families that did the parenting.
A family ahnenlist includes both sets parents, and they do receive the same ahnen numbers, but not the same report numbers.
The extended ahnen numbering scheme used involves more than just the ahnen number;
the number is suffixed with either A or B; A for Adopted, and B for Birth / Biological.
The article expands on this basic idea by briefly discussing dealing with earlier generations,
multiple adoptions in the same ancestry, and multiple adoptive parents for the same child.
You are in the fairly unique position that you develop your own genealogy software,
and I believe you will not find it hard to implement this report type.