I was wondering if for example an android-app exists, which is able to share the 2fa-code via wifi with a computer, if they are connected with the same network.
You have some kind of interface at your computer where you can copy/see the 2fa-codes and use them to log in. The computer gets these codes from your phone, where they are generated by an App with TOTP and sent to the pc locally via packets. The secret is never shared, only the generated codes, so if you disable the function on your phone or leave the wifi, it does no longer work.
Is there a 2fa-App (esp. for Android) which supports (something like) this?
Why not?
Would it be possible to implement this (as kind of an extension) to an existing App like Google Authenticatior or Authy?
Yes, something like that exists. The project is called wifiOTP and is published as an academic paper. Windows source codes are also available. An android app that can serve as a wifiOTP token is in theory also possible, but it depends on the hardware (some phones allow the phone to be a hotspot and a wifi client in the same time).