Fetching details from the dictionary...
while (one is at it); when; on the occasion of; at the same time (as); on one's way (to); by the way; incidentally; in passing
買い物のついでに郵便局に寄った。
While shopping, I stopped by the post office.
ついでに聞いてもいいですか。
May I ask while I am at it?
散歩のついでに本を返してくる。
While taking a walk, I will return the book.