'May' is technically more correct, but it sounds quite stilted and old-fashioned . Nowadays, 'can' is used in both situations - to mean both ability and permission.
Most native speakers would only use 'May...?' in joking way these days, when they are pretending to be very formal.