There are ticket offices in the centre of Milan and at the stadium, so I'm pretty sure you can buy for there on the day (the info on their website suggested you could). We also went up to Bergamo on the Sunday and tried for Atalanta-Fiorentina. There were tickets left in the office next to the stadium, but they were extortionate, so we didn't bother. No idea what Bologna is like, but I don't think it's a hard rule in Serie A that you can't buy on the day.