This is a complicated problem, and there isn’t a single KNIME node or Column Expressions function that will solve it.
This component is the next best thing.
If you want the output to be $1,000.1
then use the custom format ¤#,##0.0 (one decimal place)
If you want the output to be 1,000.1
then use the custom format #,##0.0 (one decimal place)