As we've now returned from our trip to Slovenia, I thought I'd describe how the "driving in Piran" experience turned out. In short, almost exactly as Dejan described it.
We collected a ticket from the barrier on entering the town and drove, slowly, round the harbour to the Hotel Piran. The hotel's reserved spaces across the road from the entrance were all occupied but we could park on the street in front of the entrance to check in.
Once checked in, we followed the hotel shuttle to the parking garage. At the exit barrier, which is staffed, we handed in the original ticket and a card from the hotel, so the brief drive through town was free.
When we departed, we paid the hotel for parking (at a discounted rate) and took the hotel shuttle to the garage. The shuttle driver saw us out of the garage and we were on our way. Absolutely no problem.
I'll add a couple of general comments about the driving. We rented from Sixt at Ljubljana airport and returned the car to Sixt at Ljubljana rail station. The return location was poorly signposted and rather difficult to locate but the rental itself was hassle-free.
Lastly, on arrival we drove from the airport to Kranjska Gora. Google Maps fortunately warned us of several kilometres of tailback at the entrance to the Karavanke tunnel, so we drive through Jesenice to avoid it. It looks like congestion is frequent at that point, though I couldn't tell if it was simply a delay at the top plaza or temporary Austrian border checks.
Despite not entirely co-operative weather, we thoroughly enjoyed the trip and will recommend Slovenia to everyone. We are now dieting.