Most XRF analyzers use ED (energy dispersive) or WD (wave dispersive) technology to obtain results, each with pros and cons. In general, they work well if they are calibrated, have appropriate emitters / receivers of sufficient power selected for specific elements and have a well-prepared, homogenous sample to analyze. Their main advantage is speed, more so for the hand-held models (generally 20-40K$) than the bench top (generally 50K$+) ones. Accuracy and precision of handheld models can suffer in a multielement, non-homogenous environment because of low power, small window and calibration. XRFs basically give an analysis of the surface of the sample and have little penetration. As mentioned, annual upkeep is significant. Proper procedures will minimize the dangers of xray radiation.
A certified assay will generally be under $200 (including sampling and shipping) but will take longer to obtain.
If you live in a city, many pawnshops, bullion dealers and we-buy-gold shops will have an XRF for the very purpose you describe. Many will provide a quick analysis for a minimal cost.