From carrying out some brief research, it appears that as is the case today, when using Dial-Up to access the Internet customers were often allocated a dynamic IP address by their ISP. Typically, when connecting via a Broadband connection today via a router, some protection is offered from externally-facing attacks; the router only allows traffic to reach internally-connected clients if a rule has explicitly been defined to allow packets to be forwarded to a specific internal IP via a port number. Was this the case when using Dial-Up, or in theory was a machine accessible to anyone - either unless a user had installed and configured a software-based firewall on their computer, or the ISP implemented some kind of NAT?
In the UK my dial-up connection (from 1996) was accessible to anyone whilst connected. I didn't use a firewall on my MS-DOS computer. However, due to paying per-minute phone charges to dial in (in addition to a fixed monthly charge from my ISP), I only used the connection in batch mode for email and Usenet news (no Web) so I wasn't online for very long. (I would dial in and my Internet software would automatically transfer any email or news then logoff. I would read it offline and any replies would be sent on the next login.)
When I changed to a broadband connection (in 2006) with a cable modem and a MS-Windows PC I used a firewall (ZoneAlarm) which did detect external attacks. I added a router, to get wifi. The combination of NAT and an internal firewall in the router meant that ZoneAlarm no longer saw any attacks.
When connecting to the Internet via Dial-Up, were computers directly accessible via their allocated IP address?
For example, my first internet connection was via a small ISP that used static address allocation from public address space.
(This was mid-1990s; at that time "you can't attack a service that isn't running" seemed to be sufficient)
At least some dial-up connections were directly connected to the Internet. Back in the late '90s I would often SSH in to my modem-connected home computer. Given that the addresses were dynamically assigned I'm not sure how I knew the IP to connect to. I suspect I either noted the address before leaving home or had a cron job attempt a connection to my work computer hourly or somesuch; checking its logs would show my home IP. I don't recall any port blocking going on but NETBIOS (ports 137-9) probably were blocked, especially in later years.
This is one of those "it depends" answers. Source, I used to work as a network engineer, focusing primarily on "the internal backbone" and "dialup termination" at an ISP.
We would, by default, provide a publicly routable IP based on the POP you dialled into (assigned by the chassis your call terminated in).
We also had "single statically allocated IP" or "small statically allocated netblock" as an up-sell service (assigned by RADIUS as you authenticated).
Other ISPs would allocate a non-public IP, relying on proxies and NAT to provide internet connectivity.