Using .h and .cpp files in same directory as sketch

The Arduino software scans the files for function prototyping and include files before compiling.
There is an error with that, it doesn't look at the "#ifndef", so you end up declaring "hello button" twice.

Not exactly. What happens is that the .ino file is converted to a .cpp file, and compiled. That compilation unit references the header file, so an instance of the Button class is created.

Then, the source file is compiled. It references the header file, so another instance of the Button class is created.

Then, the two compilation units are linked, and there are two instances of the Button class.

Your solution is correct, though the reason for the correction being needed is wrong. Creating is the wrong word to use. Defining a class in a header file is necessary. Instancing it in a header file is not good.