Prefer "Meter" in AmE contexts.
Use "Metre" in BrE contexts and any international-facing technical writing.
Currently, the two spellings are used in the following ways:
The BIPM (International Bureau of Weights and Measures) is an international organisation that determines the standard names and prefixes for SI (International System of Units) measurements.
It was created by the Metre Convention whose signatories include the USA. The purpose was to standardise units and their names for future scientific work.
As such, any technical text directed at an international audience should use the terms defined by the BIPM - so there is no confusion across languages. That is, any work expected to be seen outside of the USA should preferably use the spelling metre.
This spelling is also the standard spelling within the United Kingdom. As such, even non-international texts should stick to this spelling within the United Kingdom.
In purely AmE contexts (such as work that will only be seen within the United States of America), or non-technical work within AmE contexts - the spelling with the er, meter, is preferrable.
This is the most common spelling in these contexts, and will avoid confusion.
It is worth noting from an ELL perspective however, that the spelling meter is unlikely to ever cause confusion, even in a BrE context. It is preferrable to stick to the norms where possible, but outside of technical writing, the choice of spelling for this word should be seen as a minor issue.