Yes, the former user can still track your Mac's location if you didn't sign into your iCloud account.
If the former user didn't strictly follow Apple's advice to sign out of iCloud and remove the device from Find My Mac, he or she could still locate your Mac from Find My Mac until you log into the Mac with your account. That's because the device is still associated with the former user's iCloud account even if it's not logged in.
So, the previous user can potentially erase your Mac remotely or lock you out. This is actually a feature for users to track and lock down a stolen device. Anyway, it's recommended to log into a second-hand Mac once you acquire it.
Also read:
How to Factory Reset M1 Mac (MacBook Air/Pro, Mac mini, iMac)