Correct, the public IP Address will be that of the cafe. However the cafe probably keeps track of who is logged into their access point, especially if they make you sign in. Those records could be turned over to the court if subpoenaed.
Note that the IP address provides convenience in tracking routing of packets. However, the IP address is assigned to a specific MAC address, and that (more or less) is what provides the unique identification of your NIC card.