Is this a valid query that could allow to detect whether compression is supported or not?
That syntax is for Hybrid Columnar Compression. HCC is a feature that requires special hardware, like Exadata, Pillar Axiom storage, or Oracle ZFS Storage Appliance.
You can not do this on any database and certainly not in most of them. Instead of the above you can use  this for basic or advanced compression:
CREATE TABLE D ROW STORE COMPRESS BASIC AS SELECT * FROM dual;
CREATE TABLE D ROW STORE COMPRESS ADVANCED AS SELECT * FROM dual;

If you want to check the availability of compression options, use this:
SQL&gt; select parameter, value from v$option
     where parameter in ('Advanced Compression', 'Basic Compression');

PARAMETER            VALUE
-------------------- -----
Basic Compression    TRUE
Advanced Compression TRUE

The values will be FALSE in Standard Edition.
Keep in mind, Advanced Compression is an extra cost option and despite this, it still can not be properly disabled, so the above does not mean you are licensed to use it, it just means th option is available.