According to Effective C#, should all classes which uses unmanaged code implement both IDisposable and a finalizer.
No, this is about using unmanaged resources, not code. In Windows, resources are almost invariably represented by 'handles'. Unmanaged code in itself is not a resource, there is no kernel object associated with it beyond the handle for the DLL, a handle you don't have access to.
The argument you pass to SetForegroundWindow is indeed one of those resources. It is a handle to a window. But you didn't create that window yourself, you're trying to set the focus to some window that was already created and is managed by other code. You should not dispose objects that you didn't create.
Notable too is that the advice is outdated. Windows handles should be wrapped by one of the SafeHandle derived classes. They already provide a finalizer, you shouldn't implement your own. Just implement Dispose() and call the SafeHandle.Dispose() method.