No, ActivityPub is a push protocol. Other instances send data to your instance via HTTPS and only HTTPS. So you need at minimum a public domain and web server with TLS enabled.
Some people use Cloudflare tunnels to avoid opening ports or just get a cheap VPS to forward the traffic home without exposing the home IP.
I don't know enough about ActivityPub to say for sure but I believe that in order to federate properly (grab posts and comments from other servers as well as sending posts and comments to other servers) you need to have a publicly accessible domain with SSL. Hosting on localhost ( the computer you want to access from) is pointless if you don't have a reverse proxy set up to actually let others see your server online.
Depends on what you mean by "localhost". Localhost is just the computer you're currently logged in / sitting in front of... But I don't know what kind of computer that is and how it is connected to the internet.
You'd need a webserver that is reachable from the internet to be able to have a Lemmy instance that can interact with other parts of the network. The webserver itself can run on any machine. You just need to make it accessible from the internet. So you either have a connection to the internet that allows hosting stuff... Use port forwarding in your router (at home) or if that's all not available use a tunnel or VPN.
I really don't know were you're trying to get... If your question is:
Can I selfhost stuff from a domestic internet connection: The answer is: Probably. Depends a bit on the provider and setup.
If your question is: Do I need a domain name? The answer is: Probably yes if your (external) IP address changes frequently.